[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 08/12] pflash_cfi01: Add pflash_cfi01_get_blk() h
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH v2 08/12] pflash_cfi01: Add pflash_cfi01_get_blk() helper |
Date: |
Thu, 7 Mar 2019 18:23:57 +0100 |
From: Philippe Mathieu-Daudé <address@hidden>
Add an helper to access the opaque struct PFlashCFI01.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
---
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 00980316dc..60de11717b 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -994,6 +994,11 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base,
return PFLASH_CFI01(dev);
}
+BlockBackend *pflash_cfi01_get_blk(PFlashCFI01 *fl)
+{
+ return fl->blk;
+}
+
MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl)
{
return &fl->mem;
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.17.2
- Re: [Qemu-devel] [PATCH v2 06/12] vl: Factor configure_blockdev() out of main(), (continued)
- [Qemu-devel] [PATCH v2 11/12] pc: Support firmware configuration with -blockdev, Markus Armbruster, 2019/03/07
- [Qemu-devel] [PATCH v2 10/12] pc_sysfw: Pass PCMachineState to pc_system_firmware_init(), Markus Armbruster, 2019/03/07
- [Qemu-devel] [PATCH v2 12/12] docs/interop/firmware.json: Prefer -machine to if=pflash, Markus Armbruster, 2019/03/07
- [Qemu-devel] [PATCH v2 05/12] vl: Improve legibility of BlockdevOptions queue, Markus Armbruster, 2019/03/07
- [Qemu-devel] [PATCH v2 08/12] pflash_cfi01: Add pflash_cfi01_get_blk() helper,
Markus Armbruster <=
- [Qemu-devel] [PATCH v2 07/12] vl: Create block backends before setting machine properties, Markus Armbruster, 2019/03/07
- [Qemu-devel] [PATCH v2 09/12] pc_sysfw: Remove unused PcSysFwDevice, Markus Armbruster, 2019/03/07
- Re: [Qemu-devel] [PATCH v2 00/12] pc: Support firmware configuration with -blockdev, no-reply, 2019/03/07
- Re: [Qemu-devel] [PATCH v2 00/12] pc: Support firmware configuration with -blockdev, no-reply, 2019/03/07
- Re: [Qemu-devel] [PATCH v2 00/12] pc: Support firmware configuration with -blockdev, no-reply, 2019/03/07
- Re: [Qemu-devel] [PATCH v2 00/12] pc: Support firmware configuration with -blockdev, no-reply, 2019/03/08
- Re: [Qemu-devel] [PATCH v2 00/12] pc: Support firmware configuration with -blockdev, no-reply, 2019/03/08
- Re: [Qemu-devel] [PATCH v2 00/12] pc: Support firmware configuration with -blockdev, no-reply, 2019/03/08