[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v3 2/8] prep_pci: Simplify I/O endianness
From: |
Andreas Färber |
Subject: |
[Qemu-ppc] [PATCH v3 2/8] prep_pci: Simplify I/O endianness |
Date: |
Fri, 13 Jan 2012 04:09:22 +0100 |
The prep PowerPC CPU is Big Endian. An explicit byte swap therefore
effectively becomes Little Endian.
Remove explicit byte swaps and mark as Little Endian.
Signed-off-by: Andreas Färber <address@hidden>
Cc: Alexander Graf <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
---
hw/prep_pci.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/hw/prep_pci.c b/hw/prep_pci.c
index 741b273..edfb25d 100644
--- a/hw/prep_pci.c
+++ b/hw/prep_pci.c
@@ -53,14 +53,12 @@ static void PPC_PCIIO_writeb (void *opaque,
target_phys_addr_t addr, uint32_t va
static void PPC_PCIIO_writew (void *opaque, target_phys_addr_t addr, uint32_t
val)
{
PREPPCIState *s = opaque;
- val = bswap16(val);
pci_data_write(s->bus, PPC_PCIIO_config(addr), val, 2);
}
static void PPC_PCIIO_writel (void *opaque, target_phys_addr_t addr, uint32_t
val)
{
PREPPCIState *s = opaque;
- val = bswap32(val);
pci_data_write(s->bus, PPC_PCIIO_config(addr), val, 4);
}
@@ -77,7 +75,6 @@ static uint32_t PPC_PCIIO_readw (void *opaque,
target_phys_addr_t addr)
PREPPCIState *s = opaque;
uint32_t val;
val = pci_data_read(s->bus, PPC_PCIIO_config(addr), 2);
- val = bswap16(val);
return val;
}
@@ -86,7 +83,6 @@ static uint32_t PPC_PCIIO_readl (void *opaque,
target_phys_addr_t addr)
PREPPCIState *s = opaque;
uint32_t val;
val = pci_data_read(s->bus, PPC_PCIIO_config(addr), 4);
- val = bswap32(val);
return val;
}
@@ -95,7 +91,7 @@ static const MemoryRegionOps PPC_PCIIO_ops = {
.read = { PPC_PCIIO_readb, PPC_PCIIO_readw, PPC_PCIIO_readl, },
.write = { PPC_PCIIO_writeb, PPC_PCIIO_writew, PPC_PCIIO_writel, },
},
- .endianness = DEVICE_NATIVE_ENDIAN,
+ .endianness = DEVICE_LITTLE_ENDIAN,
};
static int prep_map_irq(PCIDevice *pci_dev, int irq_num)
--
1.7.7
- Re: [Qemu-ppc] [PATCH v3 3/8] prep_pci: Update I/O to MemoryRegion ops, (continued)
[Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Andreas Färber, 2012/01/12
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Jan Kiszka, 2012/01/13
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Andreas Färber, 2012/01/13
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Jan Kiszka, 2012/01/13
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Alexander Graf, 2012/01/13
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Jan Kiszka, 2012/01/13
[Qemu-ppc] [PATCH v3 4/8] prep: qdev'ify Raven host bridge (SysBus), Andreas Färber, 2012/01/12
[Qemu-ppc] [PATCH v3 1/8] prep: qdev'ify Raven host bridge (PCIDevice), Andreas Färber, 2012/01/12
[Qemu-ppc] [PATCH v3 2/8] prep_pci: Simplify I/O endianness,
Andreas Färber <=
[Qemu-ppc] [PATCH v3 7/8] prep: Add i82378 PCI-to-ISA bridge emulation, Andreas Färber, 2012/01/12
Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 0/8] qdev'ify PReP PCI host bridge and add PCI-to-ISA bridge, Andreas Färber, 2012/01/12
Re: [Qemu-ppc] [PATCH v3 0/8] qdev'ify PReP PCI host bridge and add PCI-to-ISA bridge, Alexander Graf, 2012/01/13
[Qemu-ppc] [PATCH v4 0/8] qdev'ify PReP PCI host bridge and add PCI-to-ISA bridge, Andreas Färber, 2012/01/13
- [Qemu-ppc] [PATCH v4 3/8] prep_pci: Update I/O to MemoryRegion ops, Andreas Färber, 2012/01/13
- [Qemu-ppc] [PATCH v4 1/8] prep: qdev'ify Raven host bridge (PCIDevice), Andreas Färber, 2012/01/13
- [Qemu-ppc] [PATCH v4 2/8] prep_pci: Simplify I/O endianness, Andreas Färber, 2012/01/13
- [Qemu-ppc] [PATCH v4 5/8] MAINTAINERS: Add PCI host bridge files to PReP machine, Andreas Färber, 2012/01/13
- [Qemu-ppc] [PATCH v4 4/8] prep: qdev'ify Raven host bridge (SysBus), Andreas Färber, 2012/01/13
- [Qemu-ppc] [PATCH v4 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Andreas Färber, 2012/01/13