~dannf/qemu-linaro/qemu-highbank-ppa

« back to all changes in this revision

Viewing changes to hw/ppc4xx_pci.c

  • Committer: Steve Langasek
  • Date: 2012-03-15 21:13:19 UTC
  • mfrom: (0.1.15)
  • Revision ID: steve.langasek@canonical.com-20120315211319-f1j3ot1ihx30b2s9
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
369
369
static void ppc4xx_host_bridge_class_init(ObjectClass *klass, void *data)
370
370
{
371
371
    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
372
    DeviceClass *dc = DEVICE_CLASS(klass);
372
373
 
 
374
    dc->desc        = "Host bridge";
373
375
    k->vendor_id    = PCI_VENDOR_ID_IBM;
374
376
    k->device_id    = PCI_DEVICE_ID_IBM_440GX;
375
377
    k->class_id     = PCI_CLASS_BRIDGE_OTHER;
376
378
}
377
379
 
378
 
static DeviceInfo ppc4xx_host_bridge_info = {
379
 
    .name    = "ppc4xx-host-bridge",
380
 
    .desc    = "Host bridge",
381
 
    .size    = sizeof(PCIDevice),
382
 
    .class_init = ppc4xx_host_bridge_class_init,
 
380
static TypeInfo ppc4xx_host_bridge_info = {
 
381
    .name          = "ppc4xx-host-bridge",
 
382
    .parent        = TYPE_PCI_DEVICE,
 
383
    .instance_size = sizeof(PCIDevice),
 
384
    .class_init    = ppc4xx_host_bridge_class_init,
383
385
};
384
386
 
385
387
static void ppc4xx_pcihost_class_init(ObjectClass *klass, void *data)
386
388
{
387
389
    SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
 
390
    DeviceClass *dc = DEVICE_CLASS(klass);
388
391
 
389
392
    k->init = ppc4xx_pcihost_initfn;
 
393
    dc->vmsd = &vmstate_ppc4xx_pci;
390
394
}
391
395
 
392
 
static DeviceInfo ppc4xx_pcihost_info = {
393
 
    .name    = "ppc4xx-pcihost",
394
 
    .size    = sizeof(PPC4xxPCIState),
395
 
    .vmsd    = &vmstate_ppc4xx_pci,
396
 
    .class_init = ppc4xx_pcihost_class_init,
 
396
static TypeInfo ppc4xx_pcihost_info = {
 
397
    .name          = "ppc4xx-pcihost",
 
398
    .parent        = TYPE_SYS_BUS_DEVICE,
 
399
    .instance_size = sizeof(PPC4xxPCIState),
 
400
    .class_init    = ppc4xx_pcihost_class_init,
397
401
};
398
402
 
399
 
static void ppc4xx_pci_register(void)
 
403
static void ppc4xx_pci_register_types(void)
400
404
{
401
 
    sysbus_register_withprop(&ppc4xx_pcihost_info);
402
 
    pci_qdev_register(&ppc4xx_host_bridge_info);
 
405
    type_register_static(&ppc4xx_pcihost_info);
 
406
    type_register_static(&ppc4xx_host_bridge_info);
403
407
}
404
 
device_init(ppc4xx_pci_register);
 
408
 
 
409
type_init(ppc4xx_pci_register_types)