diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2011-01-14 20:39:18 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2011-01-14 20:39:18 +0100 |
commit | 3bd4be3ada596bbed81fe955c963bb6a64335011 (patch) | |
tree | 8bf8e990dd35d3d6a629c6e9d12b9a0eaf093c3e /hw/lsi53c895a.c | |
parent | d30df5cec94cc165d76ccabb0d1847357178795e (diff) |
lsi53c895a: fix endianness issues
lsi_ram_read*() and lsi_ram_write*() are not consistent, one uses
leXX_to_cpu() the other uses nothing. As the comment above the RAM
declaration says: "Script ram is stored as 32-bit words in host
byteorder.", remove the leXX_to_cpu() calls.
This fixes the boot of an ARM versatile machine on MIPS and PowerPC
hosts.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/lsi53c895a.c')
-rw-r--r-- | hw/lsi53c895a.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index 0129ae3cc0..9c761cdb66 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -1930,7 +1930,7 @@ static uint32_t lsi_ram_readw(void *opaque, target_phys_addr_t addr) val = s->script_ram[addr >> 2]; if (addr & 2) val >>= 16; - return le16_to_cpu(val); + return val; } static uint32_t lsi_ram_readl(void *opaque, target_phys_addr_t addr) @@ -1938,7 +1938,7 @@ static uint32_t lsi_ram_readl(void *opaque, target_phys_addr_t addr) LSIState *s = opaque; addr &= 0x1fff; - return le32_to_cpu(s->script_ram[addr >> 2]); + return s->script_ram[addr >> 2]; } static CPUReadMemoryFunc * const lsi_ram_readfn[3] = { |