Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 hw/sh4/r2d.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index ecbc1ec2a98..26edcabf2c0 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -252,6 +252,7 @@ static void r2d_init(MachineState *machine)
     PCIBus *pci_bus;
     USBBus *usb_bus;
     r2d_fpga_t *fpga;
+    const hwaddr flash_base = EXT_CS_BASE(0);
     hwaddr sdram_base;
     uint64_t sdram_size = machine->ram_size;
 
@@ -321,7 +322,7 @@ static void r2d_init(MachineState *machine)
      * addressable in words of 16bit.
      */
     dinfo = drive_get(IF_PFLASH, 0, 0);
-    pflash_cfi02_register(0x0, "r2d.flash", FLASH_SIZE,
+    pflash_cfi02_register(flash_base, "r2d.flash", FLASH_SIZE,
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
                           64 * KiB, 1, 2, 0x0001, 0x227e, 0x2220, 0x2200,
                           0x555, 0x2aa, 0);
-- 
2.51.0


Reply via email to