|
|
7711c0 |
From 8486c0843637f5822dbfcc1eed561d640ff14fe9 Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Date: Fri, 17 May 2019 06:51:14 +0200
|
|
|
7711c0 |
Subject: [PATCH 47/53] pflash_cfi01: Add pflash_cfi01_get_blk() helper
|
|
|
7711c0 |
MIME-Version: 1.0
|
|
|
7711c0 |
Content-Type: text/plain; charset=UTF-8
|
|
|
7711c0 |
Content-Transfer-Encoding: 8bit
|
|
|
7711c0 |
|
|
|
7711c0 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Message-id: <20190517065120.12028-26-armbru@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 87983
|
|
|
7711c0 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v3 25/31] pflash_cfi01: Add pflash_cfi01_get_blk() helper
|
|
|
7711c0 |
Bugzilla: 1624009
|
|
|
7711c0 |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
Add an helper to access the opaque struct PFlashCFI01.
|
|
|
7711c0 |
|
|
|
7711c0 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
7711c0 |
Message-Id: <20190308131445.17502-9-armbru@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit e60cf76549a628d63f865fb6faeb1c7c0f390d0b)
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
hw/block/pflash_cfi01.c | 5 +++++
|
|
|
7711c0 |
include/hw/block/flash.h | 1 +
|
|
|
7711c0 |
2 files changed, 6 insertions(+)
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
|
|
|
7711c0 |
index 0101127..7a25051 100644
|
|
|
7711c0 |
--- a/hw/block/pflash_cfi01.c
|
|
|
7711c0 |
+++ b/hw/block/pflash_cfi01.c
|
|
|
7711c0 |
@@ -980,6 +980,11 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base,
|
|
|
7711c0 |
return PFLASH_CFI01(dev);
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
+BlockBackend *pflash_cfi01_get_blk(PFlashCFI01 *fl)
|
|
|
7711c0 |
+{
|
|
|
7711c0 |
+ return fl->blk;
|
|
|
7711c0 |
+}
|
|
|
7711c0 |
+
|
|
|
7711c0 |
MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl)
|
|
|
7711c0 |
{
|
|
|
7711c0 |
return &fl->mem;
|
|
|
7711c0 |
diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h
|
|
|
7711c0 |
index 914932e..a0f4887 100644
|
|
|
7711c0 |
--- a/include/hw/block/flash.h
|
|
|
7711c0 |
+++ b/include/hw/block/flash.h
|
|
|
7711c0 |
@@ -22,6 +22,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base,
|
|
|
7711c0 |
uint16_t id0, uint16_t id1,
|
|
|
7711c0 |
uint16_t id2, uint16_t id3,
|
|
|
7711c0 |
int be);
|
|
|
7711c0 |
+BlockBackend *pflash_cfi01_get_blk(PFlashCFI01 *fl);
|
|
|
7711c0 |
MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl);
|
|
|
7711c0 |
|
|
|
7711c0 |
/* pflash_cfi02.c */
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|