From 2990bf5da74c43f228cba85484e5e1341a0763c7 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Mon, 9 Jan 2023 12:53:05 +0100 Subject: hw/arm/pxa2xx: Simplify pxa270_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since pxa270_init() must map the device in the system memory, there is no point in passing get_system_memory() by argument. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20230109115316.2235-3-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/arm/spitz.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'hw/arm/spitz.c') diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index 5aab0b8565..f732fe0acf 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -986,18 +986,16 @@ static void spitz_common_init(MachineState *machine) SpitzMachineState *sms = SPITZ_MACHINE(machine); enum spitz_model_e model = smc->model; PXA2xxState *mpu; - MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *rom = g_new(MemoryRegion, 1); /* Setup CPU & memory */ - mpu = pxa270_init(address_space_mem, spitz_binfo.ram_size, - machine->cpu_type); + mpu = pxa270_init(spitz_binfo.ram_size, machine->cpu_type); sms->mpu = mpu; sl_flash_register(mpu, (model == spitz) ? FLASH_128M : FLASH_1024M); memory_region_init_rom(rom, NULL, "spitz.rom", SPITZ_ROM, &error_fatal); - memory_region_add_subregion(address_space_mem, 0, rom); + memory_region_add_subregion(get_system_memory(), 0, rom); /* Setup peripherals */ spitz_keyboard_register(mpu); -- cgit 1.4.1