aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-03-30 17:36:23 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-03-30 17:36:23 +0000
commit2b5eb3712350d65d3eacb3ae468aae5e846b27b3 (patch)
tree1f2469c4689462cf69c441166b74d634e81e4aac
parentadd85a76bb3b589ad38710ca24f5a10f1446d5e7 (diff)
Compile most PPC devices only once
Make byte swapping unconditional since PPC is big endian. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--Makefile.objs14
-rw-r--r--Makefile.target8
-rw-r--r--default-configs/ppc-softmmu.mak10
-rw-r--r--default-configs/ppc64-softmmu.mak10
-rw-r--r--default-configs/ppcemb-softmmu.mak10
-rw-r--r--hw/heathrow_pic.c4
-rw-r--r--hw/mac_dbdma.c4
-rw-r--r--hw/ppce500_pci.c2
-rw-r--r--hw/unin_pci.c4
9 files changed, 47 insertions, 19 deletions
diff --git a/Makefile.objs b/Makefile.objs
index 3968c35ac8..233fbbaeaa 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -154,6 +154,20 @@ hw-obj-$(CONFIG_ACPI) += acpi.o
# PPC devices
hw-obj-$(CONFIG_OPENPIC) += openpic.o
hw-obj-$(CONFIG_PREP_PCI) += prep_pci.o
+# Mac shared devices
+hw-obj-$(CONFIG_MACIO) += macio.o
+hw-obj-$(CONFIG_CUDA) += cuda.o
+hw-obj-$(CONFIG_ADB) += adb.o
+hw-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
+hw-obj-$(CONFIG_MAC_DBDMA) += mac_dbdma.o
+# OldWorld PowerMac
+hw-obj-$(CONFIG_HEATHROW_PIC) += heathrow_pic.o
+hw-obj-$(CONFIG_GRACKLE_PCI) += grackle_pci.o
+# NewWorld PowerMac
+hw-obj-$(CONFIG_UNIN_PCI) += unin_pci.o
+hw-obj-$(CONFIG_DEC_PCI) += dec_pci.o
+# PowerPC E500 boards
+hw-obj-$(CONFIG_PPCE500_PCI) += ppce500_pci.o
# PCI watchdog devices
hw-obj-y += wdt_i6300esb.o
diff --git a/Makefile.target b/Makefile.target
index 51d0fec29a..dbffe63222 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -194,17 +194,15 @@ obj-ppc-y += vga.o dma.o
# PREP target
obj-ppc-y += pckbd.o i8259.o mc146818rtc.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
-obj-ppc-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o
+obj-ppc-y += ppc_oldworld.o
# NewWorld PowerMac
-obj-ppc-y += unin_pci.o ppc_newworld.o dec_pci.o
+obj-ppc-y += ppc_newworld.o
# PowerPC 4xx boards
obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
obj-ppc-y += ppc440.o ppc440_bamboo.o
# PowerPC E500 boards
-obj-ppc-y += ppce500_pci.o ppce500_mpc8544ds.o
+obj-ppc-y += ppce500_mpc8544ds.o
obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
obj-ppc-$(CONFIG_FDT) += device_tree.o
diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 17691d9001..958bf755a7 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -11,6 +11,16 @@ CONFIG_I8254=y
CONFIG_FDC=y
CONFIG_OPENPIC=y
CONFIG_PREP_PCI=y
+CONFIG_MACIO=y
+CONFIG_CUDA=y
+CONFIG_ADB=y
+CONFIG_MAC_NVRAM=y
+CONFIG_MAC_DBDMA=y
+CONFIG_HEATHROW_PIC=y
+CONFIG_GRACKLE_PCI=y
+CONFIG_UNIN_PCI=y
+CONFIG_DEC_PCI=y
+CONFIG_PPCE500_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 774edd362a..9896662a1e 100644
--- a/default-configs/ppc64-softmmu.mak
+++ b/default-configs/ppc64-softmmu.mak
@@ -11,6 +11,16 @@ CONFIG_I8254=y
CONFIG_FDC=y
CONFIG_OPENPIC=y
CONFIG_PREP_PCI=y
+CONFIG_MACIO=y
+CONFIG_CUDA=y
+CONFIG_ADB=y
+CONFIG_MAC_NVRAM=y
+CONFIG_MAC_DBDMA=y
+CONFIG_HEATHROW_PIC=y
+CONFIG_GRACKLE_PCI=y
+CONFIG_UNIN_PCI=y
+CONFIG_DEC_PCI=y
+CONFIG_PPCE500_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 bcd5bd8cfb..2e41a942bc 100644
--- a/default-configs/ppcemb-softmmu.mak
+++ b/default-configs/ppcemb-softmmu.mak
@@ -11,6 +11,16 @@ CONFIG_I8254=y
CONFIG_FDC=y
CONFIG_OPENPIC=y
CONFIG_PREP_PCI=y
+CONFIG_MACIO=y
+CONFIG_CUDA=y
+CONFIG_ADB=y
+CONFIG_MAC_NVRAM=y
+CONFIG_MAC_DBDMA=y
+CONFIG_HEATHROW_PIC=y
+CONFIG_GRACKLE_PCI=y
+CONFIG_UNIN_PCI=y
+CONFIG_DEC_PCI=y
+CONFIG_PPCE500_PCI=y
CONFIG_IDE_CORE=y
CONFIG_IDE_QDEV=y
CONFIG_IDE_PCI=y
diff --git a/hw/heathrow_pic.c b/hw/heathrow_pic.c
index f6174b1d9f..5e270215ab 100644
--- a/hw/heathrow_pic.c
+++ b/hw/heathrow_pic.c
@@ -68,9 +68,7 @@ static void pic_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
HeathrowPIC *pic;
unsigned int n;
-#ifdef TARGET_WORDS_BIGENDIAN
value = bswap32(value);
-#endif
n = ((addr & 0xfff) - 0x10) >> 4;
PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
if (n >= 2)
@@ -120,9 +118,7 @@ static uint32_t pic_readl (void *opaque, target_phys_addr_t addr)
}
}
PIC_DPRINTF("readl: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
-#ifdef TARGET_WORDS_BIGENDIAN
value = bswap32(value);
-#endif
return value;
}
diff --git a/hw/mac_dbdma.c b/hw/mac_dbdma.c
index 8f94c35ac3..e2697d3a74 100644
--- a/hw/mac_dbdma.c
+++ b/hw/mac_dbdma.c
@@ -707,9 +707,7 @@ static void dbdma_writel (void *opaque,
DBDMA_DPRINTF("channel 0x%x reg 0x%x\n",
(uint32_t)addr >> DBDMA_CHANNEL_SHIFT, reg);
-#ifdef TARGET_WORDS_BIGENDIAN
value = bswap32(value);
-#endif
/* cmdptr cannot be modified if channel is RUN or ACTIVE */
@@ -790,9 +788,7 @@ static uint32_t dbdma_readl (void *opaque, target_phys_addr_t addr)
break;
}
-#ifdef TARGET_WORDS_BIGENDIAN
value = bswap32(value);
-#endif
return value;
}
diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c
index 683e6577b6..336d284d55 100644
--- a/hw/ppce500_pci.c
+++ b/hw/ppce500_pci.c
@@ -15,12 +15,10 @@
*/
#include "hw.h"
-#include "ppc.h"
#include "ppce500.h"
#include "pci.h"
#include "pci_host.h"
#include "bswap.h"
-#include "qemu-log.h"
#ifdef DEBUG_PCI
#define pci_debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
diff --git a/hw/unin_pci.c b/hw/unin_pci.c
index a4866f475b..f0a773d6ad 100644
--- a/hw/unin_pci.c
+++ b/hw/unin_pci.c
@@ -121,9 +121,7 @@ static void unin_data_write(ReadWriteHandler *handler,
pcibus_t addr, uint32_t val, int len)
{
UNINState *s = container_of(handler, UNINState, data_handler);
-#ifdef TARGET_WORDS_BIGENDIAN
val = qemu_bswap_len(val, len);
-#endif
UNIN_DPRINTF("write addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val);
pci_data_write(s->host_state.bus,
unin_get_config_reg(s->host_state.config_reg, addr),
@@ -140,9 +138,7 @@ static uint32_t unin_data_read(ReadWriteHandler *handler,
unin_get_config_reg(s->host_state.config_reg, addr),
len);
UNIN_DPRINTF("read addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val);
-#ifdef TARGET_WORDS_BIGENDIAN
val = qemu_bswap_len(val, len);
-#endif
return val;
}