diff options
author | Alexander Graf | 2010-12-08 12:05:37 +0100 |
---|---|---|
committer | Blue Swirl | 2010-12-11 16:24:25 +0100 |
commit | 2507c12ab026b2286b0a47035c629f3d568c96f4 (patch) | |
tree | 949765d6112d70536a3806eb822798a0e04577da /hw/tcx.c | |
parent | exec: introduce endianness swapped mmio (diff) | |
download | qemu-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/tcx.c')
-rw-r--r-- | hw/tcx.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -522,12 +522,13 @@ static int tcx_init1(SysBusDevice *dev) vram_base += size; /* DAC */ - io_memory = cpu_register_io_memory(tcx_dac_read, tcx_dac_write, s); + io_memory = cpu_register_io_memory(tcx_dac_read, tcx_dac_write, s, + DEVICE_NATIVE_ENDIAN); sysbus_init_mmio(dev, TCX_DAC_NREGS, io_memory); /* TEC (dummy) */ dummy_memory = cpu_register_io_memory(tcx_dummy_read, tcx_dummy_write, - s); + s, DEVICE_NATIVE_ENDIAN); sysbus_init_mmio(dev, TCX_TEC_NREGS, dummy_memory); /* THC: NetBSD writes here even with 8-bit display: dummy */ sysbus_init_mmio(dev, TCX_THC_NREGS_24, dummy_memory); |