hw/pci-host/raven: Rename direct config access ops
Rename memory io ops implementing PCI configuration direct access to mmcfg which describes better what these are for. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <74fcd70106289663ea426161aada78e879995d6c.1760795082.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
62ef928312
commit
046d2e21fc
1 changed files with 8 additions and 9 deletions
|
|
@ -77,25 +77,24 @@ static inline uint32_t raven_idsel_to_addr(hwaddr addr)
|
|||
return (ctz16(addr >> 11) << 11) | (addr & 0x7ff);
|
||||
}
|
||||
|
||||
static void raven_pci_io_write(void *opaque, hwaddr addr,
|
||||
uint64_t val, unsigned int size)
|
||||
static void raven_mmcfg_write(void *opaque, hwaddr addr, uint64_t val,
|
||||
unsigned int size)
|
||||
{
|
||||
PREPPCIState *s = opaque;
|
||||
PCIHostState *phb = PCI_HOST_BRIDGE(s);
|
||||
pci_data_write(phb->bus, raven_idsel_to_addr(addr), val, size);
|
||||
}
|
||||
|
||||
static uint64_t raven_pci_io_read(void *opaque, hwaddr addr,
|
||||
unsigned int size)
|
||||
static uint64_t raven_mmcfg_read(void *opaque, hwaddr addr, unsigned int size)
|
||||
{
|
||||
PREPPCIState *s = opaque;
|
||||
PCIHostState *phb = PCI_HOST_BRIDGE(s);
|
||||
return pci_data_read(phb->bus, raven_idsel_to_addr(addr), size);
|
||||
}
|
||||
|
||||
static const MemoryRegionOps raven_pci_io_ops = {
|
||||
.read = raven_pci_io_read,
|
||||
.write = raven_pci_io_write,
|
||||
static const MemoryRegionOps raven_mmcfg_ops = {
|
||||
.read = raven_mmcfg_read,
|
||||
.write = raven_mmcfg_write,
|
||||
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||
};
|
||||
|
||||
|
|
@ -253,8 +252,8 @@ static void raven_pcihost_realizefn(DeviceState *d, Error **errp)
|
|||
"pci-conf-data", 4);
|
||||
memory_region_add_subregion(&s->pci_io, 0xcfc, &h->data_mem);
|
||||
|
||||
memory_region_init_io(&h->mmcfg, OBJECT(s), &raven_pci_io_ops, s,
|
||||
"pciio", 0x00400000);
|
||||
memory_region_init_io(&h->mmcfg, OBJECT(s), &raven_mmcfg_ops, s,
|
||||
"pci-mmcfg", 0x00400000);
|
||||
memory_region_add_subregion(address_space_mem, 0x80800000, &h->mmcfg);
|
||||
|
||||
memory_region_init_io(&s->pci_intack, OBJECT(s), &raven_intack_ops, s,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue