[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/4] hw/i386/pc: Get pflash MemoryRegion with sysbus_mmio_get
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 1/4] hw/i386/pc: Get pflash MemoryRegion with sysbus_mmio_get_region() |
Date: |
Tue, 9 Mar 2021 12:01:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
Michael, Paolo, if you Ack this patch I can queue the series
via pflash-next.
On 3/7/21 11:26 PM, Philippe Mathieu-Daudé wrote:
> TYPE_PFLASH_CFI01 is a TYPE_SYS_BUS_DEVICE which registers its romd
> MemoryRegion with sysbus_init_mmio(), so we can use the generic
> sysbus_mmio_get_region() to get the region, no need for a specific
> pflash_cfi01_get_memory() helper.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/i386/pc_sysfw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
> index 9fe72b370e8..caad9cbd5eb 100644
> --- a/hw/i386/pc_sysfw.c
> +++ b/hw/i386/pc_sysfw.c
> @@ -297,7 +297,7 @@ static void pc_system_flash_map(PCMachineState *pcms,
> 0x100000000ULL - total_size);
>
> if (i == 0) {
> - flash_mem = pflash_cfi01_get_memory(system_flash);
> + flash_mem = sysbus_mmio_get_region(SYS_BUS_DEVICE(system_flash),
> 0);
> pc_isa_bios_init(rom_memory, flash_mem, size);
>
> /* Encrypt the pflash boot ROM */
>
- [PATCH 0/4] hw/block/pflash_cfi01: Remove pflash_cfi01_get_memory(), Philippe Mathieu-Daudé, 2021/03/07
- [PATCH 1/4] hw/i386/pc: Get pflash MemoryRegion with sysbus_mmio_get_region(), Philippe Mathieu-Daudé, 2021/03/07
- Re: [PATCH 1/4] hw/i386/pc: Get pflash MemoryRegion with sysbus_mmio_get_region(),
Philippe Mathieu-Daudé <=
- [PATCH 2/4] hw/mips/malta: Get pflash MemoryRegion with sysbus_mmio_get_region(), Philippe Mathieu-Daudé, 2021/03/07
- [PATCH 3/4] hw/xtensa/xtfpga: Get pflash MemoryRegion with sysbus_mmio_get_region(), Philippe Mathieu-Daudé, 2021/03/07
- [PATCH 4/4] hw/block/pflash_cfi01: Remove pflash_cfi01_get_memory(), Philippe Mathieu-Daudé, 2021/03/07
- Re: [PATCH 0/4] hw/block/pflash_cfi01: Remove pflash_cfi01_get_memory(), Paolo Bonzini, 2021/03/15