Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NvEoh-00029l-WB for qemu-devel@nongnu.org; Fri, 26 Mar 2010 15:03:36 -0400 Received: from [140.186.70.92] (port=32827 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvEof-00027D-Kd for qemu-devel@nongnu.org; Fri, 26 Mar 2010 15:03:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvEoc-0007VA-EW for qemu-devel@nongnu.org; Fri, 26 Mar 2010 15:03:32 -0400 Received: from mail-pz0-f194.google.com ([209.85.222.194]:34450) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvEoc-0007V4-8Z for qemu-devel@nongnu.org; Fri, 26 Mar 2010 15:03:30 -0400 Received: by pzk32 with SMTP id 32so2909218pzk.4 for ; Fri, 26 Mar 2010 12:03:29 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 26 Mar 2010 21:03:29 +0200 Message-ID: From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] [PATCH 06/10] Compile prep_pci only once List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Make byte swapping unconditional since PPC is big endian. Signed-off-by: Blue Swirl --- Makefile.objs | 3 +++ Makefile.target | 2 +- default-configs/ppc-softmmu.mak | 1 + default-configs/ppc64-softmmu.mak | 1 + default-configs/ppcemb-softmmu.mak | 1 + hw/prep_pci.c | 8 -------- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Makefile.objs b/Makefile.objs index b7db0a6..3a98197 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -148,7 +148,10 @@ hw-obj-$(CONFIG_USB_UHCI) += usb-uhci.o hw-obj-$(CONFIG_USB_OHCI) += usb-ohci.o hw-obj-$(CONFIG_FDC) += fdc.o hw-obj-$(CONFIG_ACPI) += acpi.o + +# PPC devices hw-obj-$(CONFIG_OPENPIC) += openpic.o +hw-obj-$(CONFIG_PREP_PCI) += prep_pci.o # PCI watchdog devices hw-obj-y += wdt_i6300esb.o diff --git a/Makefile.target b/Makefile.target index 5aabafc..fc8e8ff 100644 --- a/Makefile.target +++ b/Makefile.target @@ -194,7 +194,7 @@ obj-ppc-y = ppc.o obj-ppc-y += vga.o dma.o # PREP target obj-ppc-y += pckbd.o i8259.o mc146818rtc.o -obj-ppc-y += prep_pci.o ppc_prep.o +obj-ppc-y += ppc_prep.o # Mac shared devices obj-ppc-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o # OldWorld PowerMac diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak index 671b853..5d87c1e 100644 --- a/default-configs/ppc-softmmu.mak +++ b/default-configs/ppc-softmmu.mak @@ -10,6 +10,7 @@ CONFIG_SERIAL=y CONFIG_I8254=y CONFIG_FDC=y CONFIG_OPENPIC=y +CONFIG_PREP_PCI=y CONFIG_IDE_CORE=y CONFIG_IDE_QDEV=y CONFIG_IDE_PCI=y diff --git a/default-configs/ppc64-softmmu.mak b/default-configs/ppc64-softmmu.mak index 7841204..7818356 100644 --- a/default-configs/ppc64-softmmu.mak +++ b/default-configs/ppc64-softmmu.mak @@ -10,6 +10,7 @@ CONFIG_SERIAL=y CONFIG_I8254=y CONFIG_FDC=y CONFIG_OPENPIC=y +CONFIG_PREP_PCI=y CONFIG_IDE_CORE=y CONFIG_IDE_QDEV=y CONFIG_IDE_PCI=y diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak index 5bc4d3f..5d29e32 100644 --- a/default-configs/ppcemb-softmmu.mak +++ b/default-configs/ppcemb-softmmu.mak @@ -10,6 +10,7 @@ CONFIG_SERIAL=y CONFIG_I8254=y CONFIG_FDC=y CONFIG_OPENPIC=y +CONFIG_PREP_PCI=y CONFIG_IDE_CORE=y CONFIG_IDE_QDEV=y CONFIG_IDE_PCI=y diff --git a/hw/prep_pci.c b/hw/prep_pci.c index 19f028c..144fde0 100644 --- a/hw/prep_pci.c +++ b/hw/prep_pci.c @@ -49,18 +49,14 @@ 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; -#ifdef TARGET_WORDS_BIGENDIAN val = bswap16(val); -#endif 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; -#ifdef TARGET_WORDS_BIGENDIAN val = bswap32(val); -#endif pci_data_write(s->bus, PPC_PCIIO_config(addr), val, 4); } @@ -77,9 +73,7 @@ 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); -#ifdef TARGET_WORDS_BIGENDIAN val = bswap16(val); -#endif return val; } @@ -88,9 +82,7 @@ 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); -#ifdef TARGET_WORDS_BIGENDIAN val = bswap32(val); -#endif return val; } -- 1.6.2.4