summaryrefslogtreecommitdiffstats
path: root/hw/rc4030.c
diff options
context:
space:
mode:
authorAlexander Graf2010-12-08 12:05:37 +0100
committerBlue Swirl2010-12-11 16:24:25 +0100
commit2507c12ab026b2286b0a47035c629f3d568c96f4 (patch)
tree949765d6112d70536a3806eb822798a0e04577da /hw/rc4030.c
parentexec: introduce endianness swapped mmio (diff)
downloadqemu-2507c12ab026b2286b0a47035c629f3d568c96f4.tar.gz
qemu-2507c12ab026b2286b0a47035c629f3d568c96f4.tar.xz
qemu-2507c12ab026b2286b0a47035c629f3d568c96f4.zip
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/rc4030.c')
-rw-r--r--hw/rc4030.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/rc4030.c b/hw/rc4030.c
index abbc3eb4e2..0a9d98d1d5 100644
--- a/hw/rc4030.c
+++ b/hw/rc4030.c
@@ -819,9 +819,11 @@ void *rc4030_init(qemu_irq timer, qemu_irq jazz_bus,
register_savevm(NULL, "rc4030", 0, 2, rc4030_save, rc4030_load, s);
rc4030_reset(s);
- s_chipset = cpu_register_io_memory(rc4030_read, rc4030_write, s);
+ s_chipset = cpu_register_io_memory(rc4030_read, rc4030_write, s,
+ DEVICE_NATIVE_ENDIAN);
cpu_register_physical_memory(0x80000000, 0x300, s_chipset);
- s_jazzio = cpu_register_io_memory(jazzio_read, jazzio_write, s);
+ s_jazzio = cpu_register_io_memory(jazzio_read, jazzio_write, s,
+ DEVICE_NATIVE_ENDIAN);
cpu_register_physical_memory(0xf0000000, 0x00001000, s_jazzio);
return s;