Lines Matching +full:config +full:- +full:host

2  * QEMU Uninorth PCI host (for all Mac99 and newer machines)
27 #include "hw/qdev-properties.h"
31 #include "hw/pci-host/uninorth.h"
36 return (irq_num + (pci_dev->devfn >> 3)) & 3; in pci_unin_map_irq()
44 qemu_set_irq(s->irqs[irq_num], level); in pci_unin_set_irq()
63 slot = -1; /* XXX: should this be 0? */ in unin_get_config_reg()
68 /* config pointer */ in unin_get_config_reg()
69 retval = (reg & (0xff - 7)) | (addr & 7); in unin_get_config_reg()
85 pci_data_write(phb->bus, in unin_data_write()
86 unin_get_config_reg(phb->config_reg, addr), in unin_data_write()
97 val = pci_data_read(phb->bus, in unin_data_read()
98 unin_get_config_reg(phb->config_reg, addr), in unin_data_read()
114 return g_strdup_printf("%x", s->ofw_addr); in pci_unin_main_ofw_unit_address()
122 h->bus = pci_register_root_bus(dev, NULL, in pci_unin_main_realize()
125 &s->pci_mmio, in pci_unin_main_realize()
126 &s->pci_io, in pci_unin_main_realize()
129 pci_create_simple(h->bus, PCI_DEVFN(11, 0), "uni-north-pci"); in pci_unin_main_realize()
145 memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops, in pci_unin_main_init()
146 obj, "unin-pci-conf-idx", 0x1000); in pci_unin_main_init()
147 memory_region_init_io(&h->data_mem, OBJECT(h), &unin_data_ops, obj, in pci_unin_main_init()
148 "unin-pci-conf-data", 0x1000); in pci_unin_main_init()
150 memory_region_init(&s->pci_mmio, OBJECT(s), "unin-pci-mmio", in pci_unin_main_init()
152 memory_region_init_io(&s->pci_io, OBJECT(s), &unassigned_io_ops, obj, in pci_unin_main_init()
153 "unin-pci-isa-mmio", 0x00800000); in pci_unin_main_init()
155 memory_region_init_alias(&s->pci_hole, OBJECT(s), in pci_unin_main_init()
156 "unin-pci-hole", &s->pci_mmio, in pci_unin_main_init()
159 sysbus_init_mmio(sbd, &h->conf_mem); in pci_unin_main_init()
160 sysbus_init_mmio(sbd, &h->data_mem); in pci_unin_main_init()
161 sysbus_init_mmio(sbd, &s->pci_hole); in pci_unin_main_init()
162 sysbus_init_mmio(sbd, &s->pci_io); in pci_unin_main_init()
164 qdev_init_gpio_out(DEVICE(obj), s->irqs, ARRAY_SIZE(s->irqs)); in pci_unin_main_init()
172 h->bus = pci_register_root_bus(dev, NULL, in pci_u3_agp_realize()
175 &s->pci_mmio, in pci_u3_agp_realize()
176 &s->pci_io, in pci_u3_agp_realize()
179 pci_create_simple(h->bus, PCI_DEVFN(11, 0), "u3-agp"); in pci_u3_agp_realize()
189 memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops, in pci_u3_agp_init()
190 obj, "unin-pci-conf-idx", 0x1000); in pci_u3_agp_init()
191 memory_region_init_io(&h->data_mem, OBJECT(h), &unin_data_ops, obj, in pci_u3_agp_init()
192 "unin-pci-conf-data", 0x1000); in pci_u3_agp_init()
194 memory_region_init(&s->pci_mmio, OBJECT(s), "unin-pci-mmio", in pci_u3_agp_init()
196 memory_region_init_io(&s->pci_io, OBJECT(s), &unassigned_io_ops, obj, in pci_u3_agp_init()
197 "unin-pci-isa-mmio", 0x00800000); in pci_u3_agp_init()
199 memory_region_init_alias(&s->pci_hole, OBJECT(s), in pci_u3_agp_init()
200 "unin-pci-hole", &s->pci_mmio, in pci_u3_agp_init()
203 sysbus_init_mmio(sbd, &h->conf_mem); in pci_u3_agp_init()
204 sysbus_init_mmio(sbd, &h->data_mem); in pci_u3_agp_init()
205 sysbus_init_mmio(sbd, &s->pci_hole); in pci_u3_agp_init()
206 sysbus_init_mmio(sbd, &s->pci_io); in pci_u3_agp_init()
208 qdev_init_gpio_out(DEVICE(obj), s->irqs, ARRAY_SIZE(s->irqs)); in pci_u3_agp_init()
216 h->bus = pci_register_root_bus(dev, NULL, in pci_unin_agp_realize()
219 &s->pci_mmio, in pci_unin_agp_realize()
220 &s->pci_io, in pci_unin_agp_realize()
223 pci_create_simple(h->bus, PCI_DEVFN(11, 0), "uni-north-agp"); in pci_unin_agp_realize()
233 memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops, in pci_unin_agp_init()
234 obj, "unin-agp-conf-idx", 0x1000); in pci_unin_agp_init()
235 memory_region_init_io(&h->data_mem, OBJECT(h), &pci_host_data_le_ops, in pci_unin_agp_init()
236 obj, "unin-agp-conf-data", 0x1000); in pci_unin_agp_init()
238 sysbus_init_mmio(sbd, &h->conf_mem); in pci_unin_agp_init()
239 sysbus_init_mmio(sbd, &h->data_mem); in pci_unin_agp_init()
241 qdev_init_gpio_out(DEVICE(obj), s->irqs, ARRAY_SIZE(s->irqs)); in pci_unin_agp_init()
249 h->bus = pci_register_root_bus(dev, NULL, in pci_unin_internal_realize()
252 &s->pci_mmio, in pci_unin_internal_realize()
253 &s->pci_io, in pci_unin_internal_realize()
256 pci_create_simple(h->bus, PCI_DEVFN(14, 0), "uni-north-internal-pci"); in pci_unin_internal_realize()
266 memory_region_init_io(&h->conf_mem, OBJECT(h), &pci_host_conf_le_ops, in pci_unin_internal_init()
267 obj, "unin-pci-conf-idx", 0x1000); in pci_unin_internal_init()
268 memory_region_init_io(&h->data_mem, OBJECT(h), &pci_host_data_le_ops, in pci_unin_internal_init()
269 obj, "unin-pci-conf-data", 0x1000); in pci_unin_internal_init()
271 sysbus_init_mmio(sbd, &h->conf_mem); in pci_unin_internal_init()
272 sysbus_init_mmio(sbd, &h->data_mem); in pci_unin_internal_init()
274 qdev_init_gpio_out(DEVICE(obj), s->irqs, ARRAY_SIZE(s->irqs)); in pci_unin_internal_init()
279 d->config[PCI_CACHE_LINE_SIZE] = 0x08; in unin_main_pci_host_realize()
280 d->config[PCI_LATENCY_TIMER] = 0x10; in unin_main_pci_host_realize()
281 d->config[PCI_CAPABILITY_LIST] = 0x00; in unin_main_pci_host_realize()
288 d->config[0x48] = 0x0; in unin_main_pci_host_realize()
289 d->config[0x49] = 0x0; in unin_main_pci_host_realize()
290 d->config[0x4a] = 0x0; in unin_main_pci_host_realize()
291 d->config[0x4b] = 0x1; in unin_main_pci_host_realize()
296 d->config[PCI_CACHE_LINE_SIZE] = 0x08; in unin_agp_pci_host_realize()
297 d->config[PCI_LATENCY_TIMER] = 0x10; in unin_agp_pci_host_realize()
298 /* d->config[PCI_CAPABILITY_LIST] = 0x80; */ in unin_agp_pci_host_realize()
303 d->config[PCI_CACHE_LINE_SIZE] = 0x08; in u3_agp_pci_host_realize()
304 d->config[PCI_LATENCY_TIMER] = 0x10; in u3_agp_pci_host_realize()
309 d->config[PCI_CACHE_LINE_SIZE] = 0x08; in unin_internal_pci_host_realize()
310 d->config[PCI_LATENCY_TIMER] = 0x10; in unin_internal_pci_host_realize()
311 d->config[PCI_CAPABILITY_LIST] = 0x00; in unin_internal_pci_host_realize()
319 k->realize = unin_main_pci_host_realize; in unin_main_pci_host_class_init()
320 k->vendor_id = PCI_VENDOR_ID_APPLE; in unin_main_pci_host_class_init()
321 k->device_id = PCI_DEVICE_ID_APPLE_UNI_N_PCI; in unin_main_pci_host_class_init()
322 k->revision = 0x00; in unin_main_pci_host_class_init()
323 k->class_id = PCI_CLASS_BRIDGE_HOST; in unin_main_pci_host_class_init()
325 * PCI-facing part of the host bridge, not usable without the in unin_main_pci_host_class_init()
326 * host-facing part, which can't be device_add'ed, yet. in unin_main_pci_host_class_init()
328 dc->user_creatable = false; in unin_main_pci_host_class_init()
332 .name = "uni-north-pci",
347 k->realize = u3_agp_pci_host_realize; in u3_agp_pci_host_class_init()
348 k->vendor_id = PCI_VENDOR_ID_APPLE; in u3_agp_pci_host_class_init()
349 k->device_id = PCI_DEVICE_ID_APPLE_U3_AGP; in u3_agp_pci_host_class_init()
350 k->revision = 0x00; in u3_agp_pci_host_class_init()
351 k->class_id = PCI_CLASS_BRIDGE_HOST; in u3_agp_pci_host_class_init()
353 * PCI-facing part of the host bridge, not usable without the in u3_agp_pci_host_class_init()
354 * host-facing part, which can't be device_add'ed, yet. in u3_agp_pci_host_class_init()
356 dc->user_creatable = false; in u3_agp_pci_host_class_init()
360 .name = "u3-agp",
375 k->realize = unin_agp_pci_host_realize; in unin_agp_pci_host_class_init()
376 k->vendor_id = PCI_VENDOR_ID_APPLE; in unin_agp_pci_host_class_init()
377 k->device_id = PCI_DEVICE_ID_APPLE_UNI_N_AGP; in unin_agp_pci_host_class_init()
378 k->revision = 0x00; in unin_agp_pci_host_class_init()
379 k->class_id = PCI_CLASS_BRIDGE_HOST; in unin_agp_pci_host_class_init()
381 * PCI-facing part of the host bridge, not usable without the in unin_agp_pci_host_class_init()
382 * host-facing part, which can't be device_add'ed, yet. in unin_agp_pci_host_class_init()
384 dc->user_creatable = false; in unin_agp_pci_host_class_init()
388 .name = "uni-north-agp",
404 k->realize = unin_internal_pci_host_realize; in unin_internal_pci_host_class_init()
405 k->vendor_id = PCI_VENDOR_ID_APPLE; in unin_internal_pci_host_class_init()
406 k->device_id = PCI_DEVICE_ID_APPLE_UNI_N_I_PCI; in unin_internal_pci_host_class_init()
407 k->revision = 0x00; in unin_internal_pci_host_class_init()
408 k->class_id = PCI_CLASS_BRIDGE_HOST; in unin_internal_pci_host_class_init()
410 * PCI-facing part of the host bridge, not usable without the in unin_internal_pci_host_class_init()
411 * host-facing part, which can't be device_add'ed, yet. in unin_internal_pci_host_class_init()
413 dc->user_creatable = false; in unin_internal_pci_host_class_init()
417 .name = "uni-north-internal-pci",
428 DEFINE_PROP_UINT32("ofw-addr", UNINHostState, ofw_addr, -1),
436 dc->realize = pci_unin_main_realize; in pci_unin_main_class_init()
438 set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); in pci_unin_main_class_init()
439 dc->fw_name = "pci"; in pci_unin_main_class_init()
440 sbc->explicit_ofw_unit_address = pci_unin_main_ofw_unit_address; in pci_unin_main_class_init()
455 dc->realize = pci_u3_agp_realize; in pci_u3_agp_class_init()
456 set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); in pci_u3_agp_class_init()
471 dc->realize = pci_unin_agp_realize; in pci_unin_agp_class_init()
472 set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); in pci_unin_agp_class_init()
487 dc->realize = pci_unin_internal_realize; in pci_unin_internal_class_init()
488 set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); in pci_unin_internal_class_init()
534 memory_region_init_io(&s->mem, obj, &unin_ops, s, "unin", 0x1000); in unin_init()
536 sysbus_init_mmio(sbd, &s->mem); in unin_init()
543 set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); in unin_class_init()