Lines Matching +full:b +full:- +full:facing

20  * This file implements emulation of the 32-bit PCI controller found in some
27 #include "hw/pci-host/ppc4xx.h"
110 pci->pmm[0].la = value; in ppc4xx_pci_reg_write4()
113 pci->pmm[0].ma = value; in ppc4xx_pci_reg_write4()
116 pci->pmm[0].pciha = value; in ppc4xx_pci_reg_write4()
119 pci->pmm[0].pcila = value; in ppc4xx_pci_reg_write4()
123 pci->pmm[1].la = value; in ppc4xx_pci_reg_write4()
126 pci->pmm[1].ma = value; in ppc4xx_pci_reg_write4()
129 pci->pmm[1].pciha = value; in ppc4xx_pci_reg_write4()
132 pci->pmm[1].pcila = value; in ppc4xx_pci_reg_write4()
136 pci->pmm[2].la = value; in ppc4xx_pci_reg_write4()
139 pci->pmm[2].ma = value; in ppc4xx_pci_reg_write4()
142 pci->pmm[2].pciha = value; in ppc4xx_pci_reg_write4()
145 pci->pmm[2].pcila = value; in ppc4xx_pci_reg_write4()
149 pci->ptm[0].ms = value; in ppc4xx_pci_reg_write4()
152 pci->ptm[0].la = value; in ppc4xx_pci_reg_write4()
155 pci->ptm[1].ms = value; in ppc4xx_pci_reg_write4()
158 pci->ptm[1].la = value; in ppc4xx_pci_reg_write4()
177 value = pci->pmm[0].la; in ppc4xx_pci_reg_read4()
180 value = pci->pmm[0].ma; in ppc4xx_pci_reg_read4()
183 value = pci->pmm[0].pciha; in ppc4xx_pci_reg_read4()
186 value = pci->pmm[0].pcila; in ppc4xx_pci_reg_read4()
190 value = pci->pmm[1].la; in ppc4xx_pci_reg_read4()
193 value = pci->pmm[1].ma; in ppc4xx_pci_reg_read4()
196 value = pci->pmm[1].pciha; in ppc4xx_pci_reg_read4()
199 value = pci->pmm[1].pcila; in ppc4xx_pci_reg_read4()
203 value = pci->pmm[2].la; in ppc4xx_pci_reg_read4()
206 value = pci->pmm[2].ma; in ppc4xx_pci_reg_read4()
209 value = pci->pmm[2].pciha; in ppc4xx_pci_reg_read4()
212 value = pci->pmm[2].pcila; in ppc4xx_pci_reg_read4()
216 value = pci->ptm[0].ms; in ppc4xx_pci_reg_read4()
219 value = pci->ptm[0].la; in ppc4xx_pci_reg_read4()
222 value = pci->ptm[1].ms; in ppc4xx_pci_reg_read4()
225 value = pci->ptm[1].la; in ppc4xx_pci_reg_read4()
248 memset(pci->pmm, 0, sizeof(pci->pmm)); in ppc4xx_pci_reset()
249 memset(pci->ptm, 0, sizeof(pci->ptm)); in ppc4xx_pci_reset()
258 int slot = PCI_SLOT(pci_dev->devfn); in ppc4xx_pci_map_irq()
260 trace_ppc4xx_pci_map_irq(pci_dev->devfn, irq_num, slot); in ppc4xx_pci_map_irq()
262 return slot > 0 ? slot - 1 : PPC4xx_PCI_NUM_DEVS - 1; in ppc4xx_pci_map_irq()
319 PCIBus *b; in ppc4xx_pcihost_realize() local
325 for (i = 0; i < ARRAY_SIZE(s->irq); i++) { in ppc4xx_pcihost_realize()
326 sysbus_init_irq(sbd, &s->irq[i]); in ppc4xx_pcihost_realize()
329 b = pci_register_root_bus(dev, NULL, ppc4xx_pci_set_irq, in ppc4xx_pcihost_realize()
330 ppc4xx_pci_map_irq, s->irq, get_system_memory(), in ppc4xx_pcihost_realize()
331 get_system_io(), 0, ARRAY_SIZE(s->irq), in ppc4xx_pcihost_realize()
333 h->bus = b; in ppc4xx_pcihost_realize()
335 pci_create_simple(b, 0, TYPE_PPC4xx_HOST_BRIDGE); in ppc4xx_pcihost_realize()
338 memory_region_init(&s->container, OBJECT(s), "pci-container", PCI_ALL_SIZE); in ppc4xx_pcihost_realize()
339 memory_region_init_io(&h->conf_mem, OBJECT(s), &pci_host_conf_le_ops, h, in ppc4xx_pcihost_realize()
340 "pci-conf-idx", 4); in ppc4xx_pcihost_realize()
341 memory_region_init_io(&h->data_mem, OBJECT(s), &pci_host_data_le_ops, h, in ppc4xx_pcihost_realize()
342 "pci-conf-data", 4); in ppc4xx_pcihost_realize()
343 memory_region_init_io(&s->iomem, OBJECT(s), &pci_reg_ops, s, in ppc4xx_pcihost_realize()
345 memory_region_add_subregion(&s->container, PCIC0_CFGADDR, &h->conf_mem); in ppc4xx_pcihost_realize()
346 memory_region_add_subregion(&s->container, PCIC0_CFGDATA, &h->data_mem); in ppc4xx_pcihost_realize()
347 memory_region_add_subregion(&s->container, PCI_REG_BASE, &s->iomem); in ppc4xx_pcihost_realize()
348 sysbus_init_mmio(sbd, &s->container); in ppc4xx_pcihost_realize()
357 dc->desc = "Host bridge"; in ppc4xx_host_bridge_class_init()
358 k->vendor_id = PCI_VENDOR_ID_IBM; in ppc4xx_host_bridge_class_init()
359 k->device_id = PCI_DEVICE_ID_IBM_440GX; in ppc4xx_host_bridge_class_init()
360 k->class_id = PCI_CLASS_BRIDGE_OTHER; in ppc4xx_host_bridge_class_init()
362 * PCI-facing part of the host bridge, not usable without the in ppc4xx_host_bridge_class_init()
363 * host-facing part, which can't be device_add'ed, yet. in ppc4xx_host_bridge_class_init()
365 dc->user_creatable = false; in ppc4xx_host_bridge_class_init()
383 dc->realize = ppc4xx_pcihost_realize; in ppc4xx_pcihost_class_init()
384 dc->vmsd = &vmstate_ppc4xx_pci; in ppc4xx_pcihost_class_init()