From a455783bb6ecede44450f54980c42951fd06b7fb Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Fri, 30 Oct 2009 21:21:07 +0900 Subject: pci_host: consolidate pci config address access. consolidate pci_config address access into pci_host.c Signed-off-by: Isaku Yamahata Signed-off-by: Anthony Liguori --- hw/prep_pci.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'hw/prep_pci.c') diff --git a/hw/prep_pci.c b/hw/prep_pci.c index 5a5b3da79d..a338f81e11 100644 --- a/hw/prep_pci.c +++ b/hw/prep_pci.c @@ -28,18 +28,6 @@ typedef PCIHostState PREPPCIState; -static void pci_prep_addr_writel(void* opaque, uint32_t addr, uint32_t val) -{ - PREPPCIState *s = opaque; - s->config_reg = val; -} - -static uint32_t pci_prep_addr_readl(void* opaque, uint32_t addr) -{ - PREPPCIState *s = opaque; - return s->config_reg; -} - static inline uint32_t PPC_PCIIO_config(target_phys_addr_t addr) { int i; @@ -139,8 +127,7 @@ PCIBus *pci_prep_init(qemu_irq *pic) s->bus = pci_register_bus(NULL, "pci", prep_set_irq, prep_map_irq, pic, 0, 4); - register_ioport_write(0xcf8, 4, 4, pci_prep_addr_writel, s); - register_ioport_read(0xcf8, 4, 4, pci_prep_addr_readl, s); + pci_host_config_register_ioport(0xcf8, s); pci_host_data_register_ioport(0xcfc, s); -- cgit v1.2.3-55-g7522