mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-12 12:34:05 +00:00
Compile most PPC devices only once
Make byte swapping unconditional since PPC is big endian. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
add85a76bb
commit
2b5eb37123
@ -154,6 +154,20 @@ hw-obj-$(CONFIG_ACPI) += acpi.o
|
|||||||
# PPC devices
|
# PPC devices
|
||||||
hw-obj-$(CONFIG_OPENPIC) += openpic.o
|
hw-obj-$(CONFIG_OPENPIC) += openpic.o
|
||||||
hw-obj-$(CONFIG_PREP_PCI) += prep_pci.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
|
# PCI watchdog devices
|
||||||
hw-obj-y += wdt_i6300esb.o
|
hw-obj-y += wdt_i6300esb.o
|
||||||
|
@ -194,17 +194,15 @@ obj-ppc-y += vga.o dma.o
|
|||||||
# PREP target
|
# PREP target
|
||||||
obj-ppc-y += pckbd.o i8259.o mc146818rtc.o
|
obj-ppc-y += pckbd.o i8259.o mc146818rtc.o
|
||||||
obj-ppc-y += 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
|
# OldWorld PowerMac
|
||||||
obj-ppc-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o
|
obj-ppc-y += ppc_oldworld.o
|
||||||
# NewWorld PowerMac
|
# NewWorld PowerMac
|
||||||
obj-ppc-y += unin_pci.o ppc_newworld.o dec_pci.o
|
obj-ppc-y += ppc_newworld.o
|
||||||
# PowerPC 4xx boards
|
# PowerPC 4xx boards
|
||||||
obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
|
obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
|
||||||
obj-ppc-y += ppc440.o ppc440_bamboo.o
|
obj-ppc-y += ppc440.o ppc440_bamboo.o
|
||||||
# PowerPC E500 boards
|
# 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_KVM) += kvm_ppc.o
|
||||||
obj-ppc-$(CONFIG_FDT) += device_tree.o
|
obj-ppc-$(CONFIG_FDT) += device_tree.o
|
||||||
|
|
||||||
|
@ -11,6 +11,16 @@ CONFIG_I8254=y
|
|||||||
CONFIG_FDC=y
|
CONFIG_FDC=y
|
||||||
CONFIG_OPENPIC=y
|
CONFIG_OPENPIC=y
|
||||||
CONFIG_PREP_PCI=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_CORE=y
|
||||||
CONFIG_IDE_QDEV=y
|
CONFIG_IDE_QDEV=y
|
||||||
CONFIG_IDE_PCI=y
|
CONFIG_IDE_PCI=y
|
||||||
|
@ -11,6 +11,16 @@ CONFIG_I8254=y
|
|||||||
CONFIG_FDC=y
|
CONFIG_FDC=y
|
||||||
CONFIG_OPENPIC=y
|
CONFIG_OPENPIC=y
|
||||||
CONFIG_PREP_PCI=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_CORE=y
|
||||||
CONFIG_IDE_QDEV=y
|
CONFIG_IDE_QDEV=y
|
||||||
CONFIG_IDE_PCI=y
|
CONFIG_IDE_PCI=y
|
||||||
|
@ -11,6 +11,16 @@ CONFIG_I8254=y
|
|||||||
CONFIG_FDC=y
|
CONFIG_FDC=y
|
||||||
CONFIG_OPENPIC=y
|
CONFIG_OPENPIC=y
|
||||||
CONFIG_PREP_PCI=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_CORE=y
|
||||||
CONFIG_IDE_QDEV=y
|
CONFIG_IDE_QDEV=y
|
||||||
CONFIG_IDE_PCI=y
|
CONFIG_IDE_PCI=y
|
||||||
|
@ -68,9 +68,7 @@ static void pic_writel (void *opaque, target_phys_addr_t addr, uint32_t value)
|
|||||||
HeathrowPIC *pic;
|
HeathrowPIC *pic;
|
||||||
unsigned int n;
|
unsigned int n;
|
||||||
|
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
|
||||||
value = bswap32(value);
|
value = bswap32(value);
|
||||||
#endif
|
|
||||||
n = ((addr & 0xfff) - 0x10) >> 4;
|
n = ((addr & 0xfff) - 0x10) >> 4;
|
||||||
PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
|
PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
|
||||||
if (n >= 2)
|
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);
|
PIC_DPRINTF("readl: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
|
||||||
value = bswap32(value);
|
value = bswap32(value);
|
||||||
#endif
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -707,9 +707,7 @@ static void dbdma_writel (void *opaque,
|
|||||||
DBDMA_DPRINTF("channel 0x%x reg 0x%x\n",
|
DBDMA_DPRINTF("channel 0x%x reg 0x%x\n",
|
||||||
(uint32_t)addr >> DBDMA_CHANNEL_SHIFT, reg);
|
(uint32_t)addr >> DBDMA_CHANNEL_SHIFT, reg);
|
||||||
|
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
|
||||||
value = bswap32(value);
|
value = bswap32(value);
|
||||||
#endif
|
|
||||||
|
|
||||||
/* cmdptr cannot be modified if channel is RUN or ACTIVE */
|
/* 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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
|
||||||
value = bswap32(value);
|
value = bswap32(value);
|
||||||
#endif
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,12 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "hw.h"
|
#include "hw.h"
|
||||||
#include "ppc.h"
|
|
||||||
#include "ppce500.h"
|
#include "ppce500.h"
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include "pci_host.h"
|
#include "pci_host.h"
|
||||||
#include "bswap.h"
|
#include "bswap.h"
|
||||||
#include "qemu-log.h"
|
|
||||||
|
|
||||||
#ifdef DEBUG_PCI
|
#ifdef DEBUG_PCI
|
||||||
#define pci_debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
|
#define pci_debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
|
||||||
|
@ -121,9 +121,7 @@ static void unin_data_write(ReadWriteHandler *handler,
|
|||||||
pcibus_t addr, uint32_t val, int len)
|
pcibus_t addr, uint32_t val, int len)
|
||||||
{
|
{
|
||||||
UNINState *s = container_of(handler, UNINState, data_handler);
|
UNINState *s = container_of(handler, UNINState, data_handler);
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
|
||||||
val = qemu_bswap_len(val, len);
|
val = qemu_bswap_len(val, len);
|
||||||
#endif
|
|
||||||
UNIN_DPRINTF("write addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val);
|
UNIN_DPRINTF("write addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val);
|
||||||
pci_data_write(s->host_state.bus,
|
pci_data_write(s->host_state.bus,
|
||||||
unin_get_config_reg(s->host_state.config_reg, addr),
|
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),
|
unin_get_config_reg(s->host_state.config_reg, addr),
|
||||||
len);
|
len);
|
||||||
UNIN_DPRINTF("read addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val);
|
UNIN_DPRINTF("read addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val);
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
|
||||||
val = qemu_bswap_len(val, len);
|
val = qemu_bswap_len(val, len);
|
||||||
#endif
|
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user