|
|
7711c0 |
From 23f2d8fa204a3aa29a69e2e9d1efa5b7d22f3288 Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Date: Fri, 17 May 2019 06:50:55 +0200
|
|
|
7711c0 |
Subject: [PATCH 28/53] pflash: Rename *CFI_PFLASH* to *PFLASH_CFI*
|
|
|
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-7-armbru@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 87993
|
|
|
7711c0 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v3 06/31] pflash: Rename *CFI_PFLASH* to *PFLASH_CFI*
|
|
|
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 |
pflash_cfi01.c and pflash_cfi02.c start their identifiers with
|
|
|
7711c0 |
pflash_cfi01_ and pflash_cfi02_ respectively, except for
|
|
|
7711c0 |
CFI_PFLASH01(), TYPE_CFI_PFLASH01, CFI_PFLASH02(), TYPE_CFI_PFLASH02.
|
|
|
7711c0 |
Rename for consistency.
|
|
|
7711c0 |
|
|
|
7711c0 |
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
7711c0 |
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
|
|
|
7711c0 |
Message-Id: <20190308094610.21210-5-armbru@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit e7b6274197c5f096860014ca750544d6aca0b9b9)
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
hw/block/pflash_cfi01.c | 12 ++++++------
|
|
|
7711c0 |
hw/block/pflash_cfi02.c | 14 +++++++-------
|
|
|
7711c0 |
include/hw/block/flash.h | 4 ++--
|
|
|
7711c0 |
3 files changed, 15 insertions(+), 15 deletions(-)
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
|
|
|
7711c0 |
index 3a6bd10..1ff4d25 100644
|
|
|
7711c0 |
--- a/hw/block/pflash_cfi01.c
|
|
|
7711c0 |
+++ b/hw/block/pflash_cfi01.c
|
|
|
7711c0 |
@@ -59,8 +59,8 @@ do { \
|
|
|
7711c0 |
#define DPRINTF(fmt, ...) do { } while (0)
|
|
|
7711c0 |
#endif
|
|
|
7711c0 |
|
|
|
7711c0 |
-#define CFI_PFLASH01(obj) \
|
|
|
7711c0 |
- OBJECT_CHECK(PFlashCFI01, (obj), TYPE_CFI_PFLASH01)
|
|
|
7711c0 |
+#define PFLASH_CFI01(obj) \
|
|
|
7711c0 |
+ OBJECT_CHECK(PFlashCFI01, (obj), TYPE_PFLASH_CFI01)
|
|
|
7711c0 |
|
|
|
7711c0 |
#define PFLASH_BE 0
|
|
|
7711c0 |
#define PFLASH_SECURE 1
|
|
|
7711c0 |
@@ -711,7 +711,7 @@ static const MemoryRegionOps pflash_cfi01_ops = {
|
|
|
7711c0 |
|
|
|
7711c0 |
static void pflash_cfi01_realize(DeviceState *dev, Error **errp)
|
|
|
7711c0 |
{
|
|
|
7711c0 |
- PFlashCFI01 *pfl = CFI_PFLASH01(dev);
|
|
|
7711c0 |
+ PFlashCFI01 *pfl = PFLASH_CFI01(dev);
|
|
|
7711c0 |
uint64_t total_len;
|
|
|
7711c0 |
int ret;
|
|
|
7711c0 |
uint64_t blocks_per_device, sector_len_per_device, device_len;
|
|
|
7711c0 |
@@ -939,7 +939,7 @@ static void pflash_cfi01_class_init(ObjectClass *klass, void *data)
|
|
|
7711c0 |
|
|
|
7711c0 |
|
|
|
7711c0 |
static const TypeInfo pflash_cfi01_info = {
|
|
|
7711c0 |
- .name = TYPE_CFI_PFLASH01,
|
|
|
7711c0 |
+ .name = TYPE_PFLASH_CFI01,
|
|
|
7711c0 |
.parent = TYPE_SYS_BUS_DEVICE,
|
|
|
7711c0 |
.instance_size = sizeof(PFlashCFI01),
|
|
|
7711c0 |
.class_init = pflash_cfi01_class_init,
|
|
|
7711c0 |
@@ -962,7 +962,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base,
|
|
|
7711c0 |
uint16_t id2, uint16_t id3,
|
|
|
7711c0 |
int be)
|
|
|
7711c0 |
{
|
|
|
7711c0 |
- DeviceState *dev = qdev_create(NULL, TYPE_CFI_PFLASH01);
|
|
|
7711c0 |
+ DeviceState *dev = qdev_create(NULL, TYPE_PFLASH_CFI01);
|
|
|
7711c0 |
|
|
|
7711c0 |
if (blk) {
|
|
|
7711c0 |
qdev_prop_set_drive(dev, "drive", blk, &error_abort);
|
|
|
7711c0 |
@@ -979,7 +979,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base,
|
|
|
7711c0 |
qdev_init_nofail(dev);
|
|
|
7711c0 |
|
|
|
7711c0 |
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
|
|
|
7711c0 |
- return CFI_PFLASH01(dev);
|
|
|
7711c0 |
+ return PFLASH_CFI01(dev);
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl)
|
|
|
7711c0 |
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
|
|
|
7711c0 |
index 7fa02d2..2c0cbde 100644
|
|
|
7711c0 |
--- a/hw/block/pflash_cfi02.c
|
|
|
7711c0 |
+++ b/hw/block/pflash_cfi02.c
|
|
|
7711c0 |
@@ -57,8 +57,8 @@ do { \
|
|
|
7711c0 |
|
|
|
7711c0 |
#define PFLASH_LAZY_ROMD_THRESHOLD 42
|
|
|
7711c0 |
|
|
|
7711c0 |
-#define CFI_PFLASH02(obj) \
|
|
|
7711c0 |
- OBJECT_CHECK(PFlashCFI02, (obj), TYPE_CFI_PFLASH02)
|
|
|
7711c0 |
+#define PFLASH_CFI02(obj) \
|
|
|
7711c0 |
+ OBJECT_CHECK(PFlashCFI02, (obj), TYPE_PFLASH_CFI02)
|
|
|
7711c0 |
|
|
|
7711c0 |
struct PFlashCFI02 {
|
|
|
7711c0 |
/*< private >*/
|
|
|
7711c0 |
@@ -596,7 +596,7 @@ static const MemoryRegionOps pflash_cfi02_ops_le = {
|
|
|
7711c0 |
|
|
|
7711c0 |
static void pflash_cfi02_realize(DeviceState *dev, Error **errp)
|
|
|
7711c0 |
{
|
|
|
7711c0 |
- PFlashCFI02 *pfl = CFI_PFLASH02(dev);
|
|
|
7711c0 |
+ PFlashCFI02 *pfl = PFLASH_CFI02(dev);
|
|
|
7711c0 |
uint32_t chip_len;
|
|
|
7711c0 |
int ret;
|
|
|
7711c0 |
Error *local_err = NULL;
|
|
|
7711c0 |
@@ -760,7 +760,7 @@ static Property pflash_cfi02_properties[] = {
|
|
|
7711c0 |
|
|
|
7711c0 |
static void pflash_cfi02_unrealize(DeviceState *dev, Error **errp)
|
|
|
7711c0 |
{
|
|
|
7711c0 |
- PFlashCFI02 *pfl = CFI_PFLASH02(dev);
|
|
|
7711c0 |
+ PFlashCFI02 *pfl = PFLASH_CFI02(dev);
|
|
|
7711c0 |
timer_del(&pfl->timer);
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
@@ -775,7 +775,7 @@ static void pflash_cfi02_class_init(ObjectClass *klass, void *data)
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
static const TypeInfo pflash_cfi02_info = {
|
|
|
7711c0 |
- .name = TYPE_CFI_PFLASH02,
|
|
|
7711c0 |
+ .name = TYPE_PFLASH_CFI02,
|
|
|
7711c0 |
.parent = TYPE_SYS_BUS_DEVICE,
|
|
|
7711c0 |
.instance_size = sizeof(PFlashCFI02),
|
|
|
7711c0 |
.class_init = pflash_cfi02_class_init,
|
|
|
7711c0 |
@@ -800,7 +800,7 @@ PFlashCFI02 *pflash_cfi02_register(hwaddr base,
|
|
|
7711c0 |
uint16_t unlock_addr1,
|
|
|
7711c0 |
int be)
|
|
|
7711c0 |
{
|
|
|
7711c0 |
- DeviceState *dev = qdev_create(NULL, TYPE_CFI_PFLASH02);
|
|
|
7711c0 |
+ DeviceState *dev = qdev_create(NULL, TYPE_PFLASH_CFI02);
|
|
|
7711c0 |
|
|
|
7711c0 |
if (blk) {
|
|
|
7711c0 |
qdev_prop_set_drive(dev, "drive", blk, &error_abort);
|
|
|
7711c0 |
@@ -820,5 +820,5 @@ PFlashCFI02 *pflash_cfi02_register(hwaddr base,
|
|
|
7711c0 |
qdev_init_nofail(dev);
|
|
|
7711c0 |
|
|
|
7711c0 |
sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
|
|
|
7711c0 |
- return CFI_PFLASH02(dev);
|
|
|
7711c0 |
+ return PFLASH_CFI02(dev);
|
|
|
7711c0 |
}
|
|
|
7711c0 |
diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h
|
|
|
7711c0 |
index 51d8f60..333005d 100644
|
|
|
7711c0 |
--- a/include/hw/block/flash.h
|
|
|
7711c0 |
+++ b/include/hw/block/flash.h
|
|
|
7711c0 |
@@ -7,7 +7,7 @@
|
|
|
7711c0 |
|
|
|
7711c0 |
/* pflash_cfi01.c */
|
|
|
7711c0 |
|
|
|
7711c0 |
-#define TYPE_CFI_PFLASH01 "cfi.pflash01"
|
|
|
7711c0 |
+#define TYPE_PFLASH_CFI01 "cfi.pflash01"
|
|
|
7711c0 |
|
|
|
7711c0 |
typedef struct PFlashCFI01 PFlashCFI01;
|
|
|
7711c0 |
|
|
|
7711c0 |
@@ -24,7 +24,7 @@ MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl);
|
|
|
7711c0 |
|
|
|
7711c0 |
/* pflash_cfi02.c */
|
|
|
7711c0 |
|
|
|
7711c0 |
-#define TYPE_CFI_PFLASH02 "cfi.pflash02"
|
|
|
7711c0 |
+#define TYPE_PFLASH_CFI02 "cfi.pflash02"
|
|
|
7711c0 |
|
|
|
7711c0 |
typedef struct PFlashCFI02 PFlashCFI02;
|
|
|
7711c0 |
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|