[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/6] sh_pci: use PCIHostState instead of PCIBus.
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 1/6] sh_pci: use PCIHostState instead of PCIBus. |
Date: |
Tue, 12 Jan 2010 17:52:53 +0900 |
To use pci_host framework, use PCIHostState instead of PCIBus.
Cc: Takashi YOSHII <address@hidden>
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/sh_pci.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/hw/sh_pci.c b/hw/sh_pci.c
index abe4c75..d76d390 100644
--- a/hw/sh_pci.c
+++ b/hw/sh_pci.c
@@ -29,7 +29,7 @@
#include "bswap.h"
typedef struct {
- PCIBus *bus;
+ PCIHostState s;
PCIDevice *dev;
uint32_t par;
uint32_t mbr;
@@ -53,7 +53,7 @@ static void sh_pci_reg_write (void *p, target_phys_addr_t
addr, uint32_t val)
pcic->iobr = val;
break;
case 0x220:
- pci_data_write(pcic->bus, pcic->par, val, 4);
+ pci_data_write(pcic->s.bus, pcic->par, val, 4);
break;
}
}
@@ -67,7 +67,7 @@ static uint32_t sh_pci_reg_read (void *p, target_phys_addr_t
addr)
case 0x1c0:
return pcic->par;
case 0x220:
- return pci_data_read(pcic->bus, pcic->par, 4);
+ return pci_data_read(pcic->s.bus, pcic->par, 4);
}
return 0;
}
@@ -75,13 +75,13 @@ static uint32_t sh_pci_reg_read (void *p,
target_phys_addr_t addr)
static void sh_pci_data_write (SHPCIC *pcic, target_phys_addr_t addr,
uint32_t val, int size)
{
- pci_data_write(pcic->bus, addr + pcic->mbr, val, size);
+ pci_data_write(pcic->s.bus, addr + pcic->mbr, val, size);
}
static uint32_t sh_pci_mem_read (SHPCIC *pcic, target_phys_addr_t addr,
int size)
{
- return pci_data_read(pcic->bus, addr + pcic->mbr, size);
+ return pci_data_read(pcic->s.bus, addr + pcic->mbr, size);
}
static void sh_pci_writeb (void *p, target_phys_addr_t addr, uint32_t val)
@@ -176,10 +176,10 @@ PCIBus *sh_pci_register_bus(pci_set_irq_fn set_irq,
pci_map_irq_fn map_irq,
int mem, reg, iop;
p = qemu_mallocz(sizeof(SHPCIC));
- p->bus = pci_register_bus(NULL, "pci",
- set_irq, map_irq, opaque, devfn_min, nirq);
+ p->s.bus = pci_register_bus(NULL, "pci",
+ set_irq, map_irq, opaque, devfn_min, nirq);
- p->dev = pci_register_device(p->bus, "SH PCIC", sizeof(PCIDevice),
+ p->dev = pci_register_device(p->s.bus, "SH PCIC", sizeof(PCIDevice),
-1, NULL, NULL);
reg = cpu_register_io_memory(sh_pci_reg.r, sh_pci_reg.w, p);
iop = cpu_register_io_memory(sh_pci_iop.r, sh_pci_iop.w, p);
@@ -198,5 +198,5 @@ PCIBus *sh_pci_register_bus(pci_set_irq_fn set_irq,
pci_map_irq_fn map_irq,
p->dev->config[0x06] = 0x90;
p->dev->config[0x07] = 0x02;
- return p->bus;
+ return p->s.bus;
}
--
1.6.5.4
- [Qemu-devel] [PATCH 6/6] pci host: make pci_data_{write, read}() get PCIConfigAddress., (continued)
[Qemu-devel] [PATCH 4/6] pci_host: remove code duplication in pci_host_template.h, Isaku Yamahata, 2010/01/12
[Qemu-devel] [PATCH 2/6] sh_pci: s/sh_pci_data_write/sh_pci_mem_write/g for consistency., Isaku Yamahata, 2010/01/12
[Qemu-devel] [PATCH 1/6] sh_pci: use PCIHostState instead of PCIBus.,
Isaku Yamahata <=
[Qemu-devel] [PATCH 3/6] versatile_pci: user PCIHostState instead of PCIBus, Isaku Yamahata, 2010/01/12
[Qemu-devel] Re: [PATCH 0/6] pci: pci_data_{write, read}() clean up, Michael S. Tsirkin, 2010/01/12