All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] IDE: MMIO IDE device control should be little endian
@ 2014-08-22  8:52 Valentin Manea
  2014-08-22  9:22   ` [Qemu-devel] " Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Valentin Manea @ 2014-08-22  8:52 UTC (permalink / raw)
  To: qemu-trivial; +Cc: Peter Maydell, Wenchao Xia, Juan Quintela

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>
---
 hw/ide/mmio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c
index 01c1d0e..334c8cc 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 = {
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-09-09 19:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22  8:52 [Qemu-trivial] [PATCH] IDE: MMIO IDE device control should be little endian Valentin Manea
2014-08-22  9:22 ` Peter Maydell
2014-08-22  9:22   ` [Qemu-devel] " Peter Maydell
2014-08-24  9:24 ` [Qemu-trivial] " Michael Tokarev
2014-08-24  9:24   ` [Qemu-devel] " Michael Tokarev
2014-08-28 11:13   ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
2014-08-28 11:13     ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2014-08-31  8:32     ` [Qemu-trivial] [Qemu-devel] " Valentin Manea
2014-08-31  8:32       ` [Qemu-devel] [Qemu-trivial] " Valentin Manea
2014-08-31  8:32 ` [Qemu-devel] " Valentin Manea
2014-09-07 19:07   ` Valentin Manea
2014-09-08  8:52     ` Stefan Hajnoczi
2014-09-08  9:07   ` Stefan Hajnoczi
2014-09-08  9:11     ` Paolo Bonzini
2014-09-08 10:59     ` Michael Tokarev
2014-09-08 12:13     ` Peter Maydell
2014-09-09  8:58   ` Kevin Wolf
2014-09-09 19:18     ` Valentin Manea

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.