[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/15] versatile_pci: Declare as little endian
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 09/15] versatile_pci: Declare as little endian |
Date: |
Tue, 30 Nov 2010 15:35:55 +0100 |
This patch replaces explicit bswaps with endianness hints to the
mmio layer.
Signed-off-by: Alexander Graf <address@hidden>
---
hw/versatile_pci.c | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c
index 3baad96..cc8f9f8 100644
--- a/hw/versatile_pci.c
+++ b/hw/versatile_pci.c
@@ -32,18 +32,12 @@ static void pci_vpb_config_writeb (void *opaque,
target_phys_addr_t addr,
static void pci_vpb_config_writew (void *opaque, target_phys_addr_t addr,
uint32_t val)
{
-#ifdef TARGET_WORDS_BIGENDIAN
- val = bswap16(val);
-#endif
pci_data_write(opaque, vpb_pci_config_addr (addr), val, 2);
}
static void pci_vpb_config_writel (void *opaque, target_phys_addr_t addr,
uint32_t val)
{
-#ifdef TARGET_WORDS_BIGENDIAN
- val = bswap32(val);
-#endif
pci_data_write(opaque, vpb_pci_config_addr (addr), val, 4);
}
@@ -58,9 +52,6 @@ static uint32_t pci_vpb_config_readw (void *opaque,
target_phys_addr_t addr)
{
uint32_t val;
val = pci_data_read(opaque, vpb_pci_config_addr (addr), 2);
-#ifdef TARGET_WORDS_BIGENDIAN
- val = bswap16(val);
-#endif
return val;
}
@@ -68,9 +59,6 @@ static uint32_t pci_vpb_config_readl (void *opaque,
target_phys_addr_t addr)
{
uint32_t val;
val = pci_data_read(opaque, vpb_pci_config_addr (addr), 4);
-#ifdef TARGET_WORDS_BIGENDIAN
- val = bswap32(val);
-#endif
return val;
}
@@ -133,7 +121,7 @@ static int pci_vpb_init(SysBusDevice *dev)
s->mem_config = cpu_register_io_memory(pci_vpb_config_read,
pci_vpb_config_write, bus,
- DEVICE_NATIVE_ENDIAN);
+ DEVICE_LITTLE_ENDIAN);
sysbus_init_mmio_cb(dev, 0x04000000, pci_vpb_map);
pci_create_simple(bus, -1, "versatile_pci_host");
--
1.6.0.2
- [Qemu-devel] [PATCH 11/15] openpic: Replace explicit byte swap with endian hints, (continued)
- [Qemu-devel] [PATCH 11/15] openpic: Replace explicit byte swap with endian hints, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 13/15] heathrow_pic: Declare as little endian, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 10/15] ppc4xx_pci: Declare as little endian, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 08/15] prep: Declare as little endian, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 01/15] exec: introduce endianness swapped mmio, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 12/15] rtl8139: Declare as little endian, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 03/15] Make simple io mem handler endian aware, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 07/15] e1000: Make little endian, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 02/15] Add endianness as io mem parameter, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 05/15] pci-host: Delegate bswap to mmio layer, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 09/15] versatile_pci: Declare as little endian,
Alexander Graf <=
- [Qemu-devel] [PATCH 06/15] uninorth: Get rid of bswap, Alexander Graf, 2010/11/30
- [Qemu-devel] [PATCH 04/15] dbdma: Make little endian, Alexander Graf, 2010/11/30