]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
pflash_cfi01: Add pflash_cfi01_get_blk() helper
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 8 Mar 2019 13:14:41 +0000 (14:14 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 11 Mar 2019 21:53:44 +0000 (22:53 +0100)
Add an helper to access the opaque struct PFlashCFI01.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190308131445.17502-9-armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
hw/block/pflash_cfi01.c
include/hw/block/flash.h

index 9d1c356eb63a3ab9adb6bd13ced17c617d596f23..125f70b8e46c7030ed3f41f592bca560aea4de01 100644 (file)
@@ -967,6 +967,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;
index 914932eaec852eb9e74a7ad5bffc586fd7f56612..a0f488732af7f70e97ddae5c53b2810e452d7866 100644 (file)
@@ -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 */