void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp)

{

    int i;



    if (s->portnr > NB_PORTS) {

        error_setg(errp, "Too many ports! Max. port number is %d.",

                   NB_PORTS);










    usb_bus_new(&s->bus, sizeof(s->bus), s->companion_enable ?

                &ehci_bus_ops_companion : &ehci_bus_ops_standalone, dev);

    for (i = 0; i < s->portnr; i++) {

        usb_register_port(&s->bus, &s->ports[i], s, i, &ehci_port_ops,

                          USB_SPEED_MASK_HIGH);

        s->ports[i].dev = 0;




    s->frame_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, ehci_work_timer, s);

    s->async_bh = qemu_bh_new(ehci_work_bh, s);

    s->device = dev;



    s->vmstate = qemu_add_vm_change_state_handler(usb_ehci_vm_state_change, s);

void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp)

{

    int i;



    if (s->portnr > NB_PORTS) {

        error_setg(errp, "Too many ports! Max. port number is %d.",

                   NB_PORTS);










    usb_bus_new(&s->bus, sizeof(s->bus), s->companion_enable ?

                &ehci_bus_ops_companion : &ehci_bus_ops_standalone, dev);

    for (i = 0; i < s->portnr; i++) {

        usb_register_port(&s->bus, &s->ports[i], s, i, &ehci_port_ops,

                          USB_SPEED_MASK_HIGH);

        s->ports[i].dev = 0;




    s->frame_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, ehci_work_timer, s);

    s->async_bh = qemu_bh_new(ehci_work_bh, s);

    s->device = dev;



    s->vmstate = qemu_add_vm_change_state_handler(usb_ehci_vm_state_change, s);

void FUNC_0(EHCIState *VAR_0, DeviceState *VAR_1, Error **VAR_2)

{

    int VAR_3;



    if (VAR_0->portnr > NB_PORTS) {

        error_setg(VAR_2, "Too many ports! Max. port number is %d.",

                   NB_PORTS);










    usb_bus_new(&VAR_0->bus, sizeof(VAR_0->bus), VAR_0->companion_enable ?

                &ehci_bus_ops_companion : &ehci_bus_ops_standalone, VAR_1);

    for (VAR_3 = 0; VAR_3 < VAR_0->portnr; VAR_3++) {

        usb_register_port(&VAR_0->bus, &VAR_0->ports[VAR_3], VAR_0, VAR_3, &ehci_port_ops,

                          USB_SPEED_MASK_HIGH);

        VAR_0->ports[VAR_3].VAR_1 = 0;




    VAR_0->frame_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, ehci_work_timer, VAR_0);

    VAR_0->async_bh = qemu_bh_new(ehci_work_bh, VAR_0);

    VAR_0->device = VAR_1;



    VAR_0->vmstate = qemu_add_vm_change_state_handler(usb_ehci_vm_state_change, VAR_0);

void FUNC_0(EHCIState *VAR_0, DeviceState *VAR_1, Error **VAR_2)
{ int VAR_3; if (VAR_0->portnr > NB_PORTS) { error_setg(VAR_2, "Too many ports! Max. port number is %d.",
NB_PORTS); usb_bus_new(&VAR_0->bus, sizeof(VAR_0->bus), VAR_0->companion_enable ?
&ehci_bus_ops_companion : &ehci_bus_ops_standalone, VAR_1); for (VAR_3 = 0; VAR_3 < VAR_0->portnr; VAR_3++) { usb_register_port(&VAR_0->bus, &VAR_0->ports[VAR_3], VAR_0, VAR_3, &ehci_port_ops,
USB_SPEED_MASK_HIGH); VAR_0->ports[VAR_3].VAR_1 = 0; VAR_0->frame_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, ehci_work_timer, VAR_0); VAR_0->async_bh = qemu_bh_new(ehci_work_bh, VAR_0); VAR_0->device = VAR_1; VAR_0->vmstate = qemu_add_vm_change_state_handler(usb_ehci_vm_state_change, VAR_0);