From: aurel32 Date: Sat, 24 Jan 2009 18:18:20 +0000 (+0000) Subject: sh4: r2d. Endian conversion for peripheral register initialization. X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1405^2~17^2~9218 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ec3ff526ff8410f1a8e0cc3bc0f11c7e4d0e90a;p=sdk%2Femulator%2Fqemu.git sh4: r2d. Endian conversion for peripheral register initialization. Add endian conversion to hw/r2d.c which lacks consideration of endian on setting BSC registers. Signed-off-by: Takashi YOSHII Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6431 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/hw/r2d.c b/hw/r2d.c index 09305f3154..3901a7361d 100644 --- a/hw/r2d.c +++ b/hw/r2d.c @@ -238,10 +238,8 @@ static void r2d_init(ram_addr_t ram_size, int vga_ram_size, { int kernel_size; /* initialization which should be done by firmware */ - uint32_t bcr1 = 1 << 3; /* cs3 SDRAM */ - uint16_t bcr2 = 3 << (3 * 2); /* cs3 32-bit */ - cpu_physical_memory_write(SH7750_BCR1_A7, (uint8_t *)&bcr1, 4); - cpu_physical_memory_write(SH7750_BCR2_A7, (uint8_t *)&bcr2, 2); + stl_phys(SH7750_BCR1, 1<<3); /* cs3 SDRAM */ + stw_phys(SH7750_BCR2, 3<<(3*2)); /* cs3 32bit */ kernel_size = load_image(kernel_filename, phys_ram_base);