Diff for /qemu/hw/grackle_pci.c between versions 1.1.1.10 and 1.1.1.11

version 1.1.1.10, 2018/04/24 19:28:39 version 1.1.1.11, 2018/04/24 19:48:29
Line 71  PCIBus *pci_grackle_init(uint32_t base,  Line 71  PCIBus *pci_grackle_init(uint32_t base, 
     SysBusDevice *s;      SysBusDevice *s;
     GrackleState *d;      GrackleState *d;
   
     dev = qdev_create(NULL, "grackle");      dev = qdev_create(NULL, "grackle-pcihost");
     qdev_init_nofail(dev);      qdev_init_nofail(dev);
     s = sysbus_from_qdev(dev);      s = sysbus_from_qdev(dev);
     d = FROM_SYSBUS(GrackleState, s);      d = FROM_SYSBUS(GrackleState, s);
Line 108  static int pci_grackle_init_device(SysBu Line 108  static int pci_grackle_init_device(SysBu
                           &s->host_state, "pci-conf-idx", 0x1000);                            &s->host_state, "pci-conf-idx", 0x1000);
     memory_region_init_io(&s->host_state.data_mem, &pci_host_data_le_ops,      memory_region_init_io(&s->host_state.data_mem, &pci_host_data_le_ops,
                           &s->host_state, "pci-data-idx", 0x1000);                            &s->host_state, "pci-data-idx", 0x1000);
     sysbus_init_mmio_region(dev, &s->host_state.conf_mem);      sysbus_init_mmio(dev, &s->host_state.conf_mem);
     sysbus_init_mmio_region(dev, &s->host_state.data_mem);      sysbus_init_mmio(dev, &s->host_state.data_mem);
   
     qemu_register_reset(pci_grackle_reset, &s->host_state);      qemu_register_reset(pci_grackle_reset, &s->host_state);
     return 0;      return 0;
Line 121  static int grackle_pci_host_init(PCIDevi Line 121  static int grackle_pci_host_init(PCIDevi
     return 0;      return 0;
 }  }
   
 static PCIDeviceInfo grackle_pci_host_info = {  static void grackle_pci_class_init(ObjectClass *klass, void *data)
     .qdev.name = "grackle",  {
     .qdev.size = sizeof(PCIDevice),      PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
     .init      = grackle_pci_host_init,      DeviceClass *dc = DEVICE_CLASS(klass);
     .vendor_id = PCI_VENDOR_ID_MOTOROLA,  
     .device_id = PCI_DEVICE_ID_MOTOROLA_MPC106,      k->init      = grackle_pci_host_init;
     .revision  = 0x00,      k->vendor_id = PCI_VENDOR_ID_MOTOROLA;
     .class_id  = PCI_CLASS_BRIDGE_HOST,      k->device_id = PCI_DEVICE_ID_MOTOROLA_MPC106;
       k->revision  = 0x00;
       k->class_id  = PCI_CLASS_BRIDGE_HOST;
       dc->no_user = 1;
   }
   
   static TypeInfo grackle_pci_info = {
       .name          = "grackle",
       .parent        = TYPE_PCI_DEVICE,
       .instance_size = sizeof(PCIDevice),
       .class_init = grackle_pci_class_init,
   };
   
   static void pci_grackle_class_init(ObjectClass *klass, void *data)
   {
       SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
       DeviceClass *dc = DEVICE_CLASS(klass);
   
       k->init = pci_grackle_init_device;
       dc->no_user = 1;
   }
   
   static TypeInfo grackle_pci_host_info = {
       .name          = "grackle-pcihost",
       .parent        = TYPE_SYS_BUS_DEVICE,
       .instance_size = sizeof(GrackleState),
       .class_init    = pci_grackle_class_init,
 };  };
   
 static void grackle_register_devices(void)  static void grackle_register_types(void)
 {  {
     sysbus_register_dev("grackle", sizeof(GrackleState),      type_register_static(&grackle_pci_info);
                         pci_grackle_init_device);      type_register_static(&grackle_pci_host_info);
     pci_qdev_register(&grackle_pci_host_info);  
 }  }
   
 device_init(grackle_register_devices)  type_init(grackle_register_types)

Removed from v.1.1.1.10  
changed lines
  Added in v.1.1.1.11


unix.superglobalmegacorp.com