mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
pci_host: consolidate pci config address access.
consolidate pci_config address access into pci_host.c Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
4f5e19e6c5
commit
a455783bb6
8 changed files with 121 additions and 223 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue