[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 19/20] hw/block: Remove unused pflash_cfi02_register()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 19/20] hw/block: Remove unused pflash_cfi02_register() |
Date: |
Wed, 4 Jan 2023 23:04:48 +0100 |
We converted all caller of pflash_cfi02_register() by open
coding a call to pflash_cfi02_create() followed by an explicit
call to sysbus_mmio_map(); we can now remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/block/pflash_cfi02.c | 22 ----------------------
include/hw/block/flash.h | 12 ------------
2 files changed, 34 deletions(-)
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 176f93b512..a9dcabdeb2 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -1024,25 +1024,3 @@ DeviceState *pflash_cfi02_create(const char *name,
hwaddr size,
return dev;
}
-
-PFlashCFI02 *pflash_cfi02_register(hwaddr base,
- const char *name,
- hwaddr size,
- BlockBackend *blk,
- uint32_t sector_len,
- int nb_mappings, int width,
- uint16_t id0, uint16_t id1,
- uint16_t id2, uint16_t id3,
- uint16_t unlock_addr0,
- uint16_t unlock_addr1,
- int be)
-{
- DeviceState *dev;
-
- dev = pflash_cfi02_create(name, size, blk, sector_len,
- nb_mappings, width, id0, id1, id2, id3,
- unlock_addr0, unlock_addr1, be);
- sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base);
-
- return PFLASH_CFI02(dev);
-}
diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h
index 78b078955e..64ee40c561 100644
--- a/include/hw/block/flash.h
+++ b/include/hw/block/flash.h
@@ -45,18 +45,6 @@ DeviceState *pflash_cfi02_create(const char *name, hwaddr
size,
uint16_t id2, uint16_t id3,
uint16_t unlock_addr0, uint16_t unlock_addr1,
int be);
-PFlashCFI02 *pflash_cfi02_register(hwaddr base,
- const char *name,
- hwaddr size,
- BlockBackend *blk,
- uint32_t sector_len,
- int nb_mappings,
- int width,
- uint16_t id0, uint16_t id1,
- uint16_t id2, uint16_t id3,
- uint16_t unlock_addr0,
- uint16_t unlock_addr1,
- int be);
/* nand.c */
DeviceState *nand_init(BlockBackend *blk, int manf_id, int chip_id);
--
2.38.1
- Re: [PATCH 10/20] hw/arm: Open-code pflash_cfi01_register(), (continued)
- [PATCH 11/20] hw/microblaze: Open-code pflash_cfi01_register(), Philippe Mathieu-Daudé, 2023/01/04
- [PATCH 12/20] hw/mips: Open-code pflash_cfi01_register(), Philippe Mathieu-Daudé, 2023/01/04
- [PATCH 13/20] hw/ppc: Open-code pflash_cfi01_register(), Philippe Mathieu-Daudé, 2023/01/04
- [PATCH 14/20] hw/block: Remove unused pflash_cfi01_register(), Philippe Mathieu-Daudé, 2023/01/04
- [PATCH 16/20] hw/block: Factor pflash_cfi02_create() out of pflash_cfi02_register(), Philippe Mathieu-Daudé, 2023/01/04
- [PATCH 15/20] hw/block: Make PFlashCFI01 QOM declaration internal, Philippe Mathieu-Daudé, 2023/01/04
- [PATCH 17/20] hw/arm: Open-code pflash_cfi02_register(), Philippe Mathieu-Daudé, 2023/01/04
- [PATCH 18/20] hw/sh4: Open-code pflash_cfi02_register(), Philippe Mathieu-Daudé, 2023/01/04
- [PATCH 20/20] hw/block: Make PFlashCFI02 QOM declaration internal, Philippe Mathieu-Daudé, 2023/01/04
- [PATCH 19/20] hw/block: Remove unused pflash_cfi02_register(),
Philippe Mathieu-Daudé <=
- Re: [PATCH 00/20] hw: Remove implicit sysbus_mmio_map() from pflash APIs, Peter Maydell, 2023/01/06