Diff for /qemu/hw/milkymist-minimac2.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2018/04/24 19:28:27 version 1.1.1.3, 2018/04/24 19:48:14
Line 465  static int milkymist_minimac2_init(SysBu Line 465  static int milkymist_minimac2_init(SysBu
   
     memory_region_init_io(&s->regs_region, &minimac2_ops, s,      memory_region_init_io(&s->regs_region, &minimac2_ops, s,
                           "milkymist-minimac2", R_MAX * 4);                            "milkymist-minimac2", R_MAX * 4);
     sysbus_init_mmio_region(dev, &s->regs_region);      sysbus_init_mmio(dev, &s->regs_region);
   
     /* register buffers memory */      /* register buffers memory */
     memory_region_init_ram(&s->buffers, NULL, "milkymist-minimac2.buffers",      memory_region_init_ram(&s->buffers, "milkymist-minimac2.buffers",
                            buffers_size);                             buffers_size);
       vmstate_register_ram_global(&s->buffers);
     s->rx0_buf = memory_region_get_ram_ptr(&s->buffers);      s->rx0_buf = memory_region_get_ram_ptr(&s->buffers);
     s->rx1_buf = s->rx0_buf + MINIMAC2_BUFFER_SIZE;      s->rx1_buf = s->rx0_buf + MINIMAC2_BUFFER_SIZE;
     s->tx_buf = s->rx1_buf + MINIMAC2_BUFFER_SIZE;      s->tx_buf = s->rx1_buf + MINIMAC2_BUFFER_SIZE;
Line 478  static int milkymist_minimac2_init(SysBu Line 479  static int milkymist_minimac2_init(SysBu
   
     qemu_macaddr_default_if_unset(&s->conf.macaddr);      qemu_macaddr_default_if_unset(&s->conf.macaddr);
     s->nic = qemu_new_nic(&net_milkymist_minimac2_info, &s->conf,      s->nic = qemu_new_nic(&net_milkymist_minimac2_info, &s->conf,
                           dev->qdev.info->name, dev->qdev.id, s);                            object_get_typename(OBJECT(dev)), dev->qdev.id, s);
     qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);      qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a);
   
     return 0;      return 0;
Line 515  static const VMStateDescription vmstate_ Line 516  static const VMStateDescription vmstate_
     }      }
 };  };
   
 static SysBusDeviceInfo milkymist_minimac2_info = {  static Property milkymist_minimac2_properties[] = {
     .init = milkymist_minimac2_init,      DEFINE_PROP_TADDR("buffers_base", MilkymistMinimac2State,
     .qdev.name  = "milkymist-minimac2",      buffers_base, 0),
     .qdev.size  = sizeof(MilkymistMinimac2State),      DEFINE_NIC_PROPERTIES(MilkymistMinimac2State, conf),
     .qdev.vmsd  = &vmstate_milkymist_minimac2,      DEFINE_PROP_STRING("phy_model", MilkymistMinimac2State, phy_model),
     .qdev.reset = milkymist_minimac2_reset,      DEFINE_PROP_END_OF_LIST(),
     .qdev.props = (Property[]) {  };
         DEFINE_PROP_TADDR("buffers_base", MilkymistMinimac2State,  
                 buffers_base, 0),  static void milkymist_minimac2_class_init(ObjectClass *klass, void *data)
         DEFINE_NIC_PROPERTIES(MilkymistMinimac2State, conf),  {
         DEFINE_PROP_STRING("phy_model", MilkymistMinimac2State, phy_model),      DeviceClass *dc = DEVICE_CLASS(klass);
         DEFINE_PROP_END_OF_LIST(),      SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
     }  
       k->init = milkymist_minimac2_init;
       dc->reset = milkymist_minimac2_reset;
       dc->vmsd = &vmstate_milkymist_minimac2;
       dc->props = milkymist_minimac2_properties;
   }
   
   static TypeInfo milkymist_minimac2_info = {
       .name          = "milkymist-minimac2",
       .parent        = TYPE_SYS_BUS_DEVICE,
       .instance_size = sizeof(MilkymistMinimac2State),
       .class_init    = milkymist_minimac2_class_init,
 };  };
   
 static void milkymist_minimac2_register(void)  static void milkymist_minimac2_register_types(void)
 {  {
     sysbus_register_withprop(&milkymist_minimac2_info);      type_register_static(&milkymist_minimac2_info);
 }  }
   
 device_init(milkymist_minimac2_register)  type_init(milkymist_minimac2_register_types)

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


unix.superglobalmegacorp.com