Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
hw/sh4/r2d.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
index 5fd06b3b731..9de4944ecee 100644
--- a/hw/sh4/r2d.c
+++ b/hw/sh4/r2d.c
@@ -350,10 +350,12 @@ static void r2d_init(MachineState *machine)
}
/* initialization which should be done by firmware */
- address_space_stl(&address_space_memory, SH7750_BCR1, 1 << 3,
- MEMTXATTRS_UNSPECIFIED, NULL); /* cs3 SDRAM */
- address_space_stw(&address_space_memory, SH7750_BCR2, 3 << (3 * 2),
- MEMTXATTRS_UNSPECIFIED, NULL); /* cs3 32bit */
+ address_space_stl(&address_space_memory, SH7750_BCR1,
+ (1 << 3) | /* Areas 3 accessed as SDRAM */
+ 0, MEMTXATTRS_UNSPECIFIED, NULL);
+ address_space_stw(&address_space_memory, SH7750_BCR2,
+ (0b11 << 2 * 3) | /* Area 3 Bus width is 32 bits */
+ 0, MEMTXATTRS_UNSPECIFIED, NULL);
/* Start from P2 area */
reset_info->vector = (sdram_base + LINUX_LOAD_OFFSET) | 0xa0000000;
}
--
2.51.0