All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Cc: "Laszlo Ersek" <lersek@redhat.com>,
	qemu-block@nongnu.org, "Kevin Wolf" <kwolf@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [Qemu-devel] [PATCH 1/4] pflash_cfi01: Add pflash_cfi01_get_blk() helper
Date: Mon,  4 Mar 2019 20:48:54 +0100	[thread overview]
Message-ID: <20190304194857.9780-2-philmd@redhat.com> (raw)
In-Reply-To: <20190304194857.9780-1-philmd@redhat.com>

Add an helper to access the opaque struct PFlashCFI01.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
[PMD: Extracted from bigger patch]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/block/pflash_cfi01.c  | 5 +++++
 include/hw/block/flash.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 9d1c356eb6..9ecab693e8 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -972,6 +972,11 @@ MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl)
     return &fl->mem;
 }
 
+BlockBackend *pflash_cfi01_get_blk(PFlashCFI01 *fl)
+{
+    return fl->blk;
+}
+
 static void postload_update_cb(void *opaque, int running, RunState state)
 {
     PFlashCFI01 *pfl = opaque;
diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h
index 914932eaec..a0f488732a 100644
--- a/include/hw/block/flash.h
+++ b/include/hw/block/flash.h
@@ -22,6 +22,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base,
                                    uint16_t id0, uint16_t id1,
                                    uint16_t id2, uint16_t id3,
                                    int be);
+BlockBackend *pflash_cfi01_get_blk(PFlashCFI01 *fl);
 MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl);
 
 /* pflash_cfi02.c */
-- 
2.20.1

  reply	other threads:[~2019-03-04 19:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 19:48 [Qemu-devel] [RFC PATCH 0/4] pc: Support firmware configuration with -blockdev (splitted) Philippe Mathieu-Daudé
2019-03-04 19:48 ` Philippe Mathieu-Daudé [this message]
2019-03-05 17:17   ` [Qemu-devel] [PATCH 1/4] pflash_cfi01: Add pflash_cfi01_get_blk() helper Laszlo Ersek
2019-03-06 14:16     ` Markus Armbruster
2019-03-04 19:48 ` [Qemu-devel] [PATCH 2/4] hw/i386/pc_sysfw: Remove obsolete PcSysFwDevice Philippe Mathieu-Daudé
2019-03-05 17:19   ` Laszlo Ersek
2019-03-04 19:48 ` [Qemu-devel] [PATCH 3/4] hw/i386/pc_sysfw: Let pc_system_firmware_init() access PCMachineState Philippe Mathieu-Daudé
2019-03-05 17:30   ` Laszlo Ersek
2019-03-07 15:29     ` Markus Armbruster
2019-03-04 19:48 ` [Qemu-devel] [RFC PATCH 4/4] pc: Support firmware configuration with -blockdev Philippe Mathieu-Daudé
2019-03-05 17:34   ` Laszlo Ersek
2019-03-05 17:53     ` Philippe Mathieu-Daudé
2019-03-06 14:21 ` [Qemu-devel] [RFC PATCH 0/4] pc: Support firmware configuration with -blockdev (splitted) Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190304194857.9780-2-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.