aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/mmio.c
diff options
context:
space:
mode:
authorValentin Manea <valentin.manea@gmail.com>2014-08-31 11:32:08 +0300
committerKevin Wolf <kwolf@redhat.com>2014-09-10 10:41:29 +0200
commit1a7044bb62ca490b8742ac17d40bb774b7a9048e (patch)
tree10787d5429bfbfdcf5690c93309a2620f43975cc /hw/ide/mmio.c
parenta31e69cf007dd2e7f6912b7839de1ebd1a41d091 (diff)
IDE: MMIO IDE device control should be little endian
Set the IDE MMIO memory type to little endian. The ATA specs identify words part of the control commands encoded as little endian. While this has no impact on little endian systems, it's required for big endian systems(eg OpenRisc). Signed-off-by: Valentin Manea <valentin.manea@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/mmio.c')
-rw-r--r--hw/ide/mmio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
index 01c1d0e6ce..334c8ccf08 100644
--- a/hw/ide/mmio.c
+++ b/hw/ide/mmio.c
@@ -82,7 +82,7 @@ static void mmio_ide_write(void *opaque, hwaddr addr,
static const MemoryRegionOps mmio_ide_ops = {
.read = mmio_ide_read,
.write = mmio_ide_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
+ .endianness = DEVICE_LITTLE_ENDIAN,
};
static uint64_t mmio_ide_status_read(void *opaque, hwaddr addr,
@@ -102,7 +102,7 @@ static void mmio_ide_cmd_write(void *opaque, hwaddr addr,
static const MemoryRegionOps mmio_ide_cs_ops = {
.read = mmio_ide_status_read,
.write = mmio_ide_cmd_write,
- .endianness = DEVICE_NATIVE_ENDIAN,
+ .endianness = DEVICE_LITTLE_ENDIAN,
};
static const VMStateDescription vmstate_ide_mmio = {