Changeset 5d07f54 in mainline


Ignore:
Timestamp:
2011-05-07T11:42:34Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7ab7c7f6
Parents:
bba0dc20
Message:

Reset OHCI root hub even if taking control from SMM driver

postpone root hub registration

Location:
uspace/drv/ohci
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/hc.c

    rbba0dc20 r5d07f54  
    9191                usb_log_error("Failed add root hub match-id.\n");
    9292        }
     93        ret = ddf_fun_bind(hub_fun);
    9394        return ret;
    9495}
     
    288289{
    289290        assert(instance);
    290         usb_log_debug("OHCI interrupt: %x.\n", status);
     291        usb_log_debug("OHCI(%p) interrupt: %x.\n", instance, status);
    291292        if ((status & ~I_SF) == 0) /* ignore sof status */
    292293                return;
     
    354355                }
    355356                usb_log_info("SMM driver: Ownership taken.\n");
     357                instance->registers->control &= (C_HCFS_RESET << C_HCFS_SHIFT);
     358                async_usleep(50000);
    356359                return;
    357360        }
     
    478481{
    479482        assert(instance);
     483
     484        bzero(&instance->rh, sizeof(instance->rh));
    480485        /* Init queues */
    481486        hc_init_transfer_lists(instance);
  • uspace/drv/ohci/main.c

    rbba0dc20 r5d07f54  
    7575                return ret;
    7676        }
    77         device->driver_data = ohci;
     77//      device->driver_data = ohci;
     78        hc_register_hub(&ohci->hc, ohci->rh_fun);
    7879
    7980        usb_log_info("Controlling new OHCI device `%s'.\n", device->name);
  • uspace/drv/ohci/ohci.c

    rbba0dc20 r5d07f54  
    5454{
    5555        assert(dev);
     56        assert(dev->driver_data);
    5657        hc_t *hc = &((ohci_t*)dev->driver_data)->hc;
    5758        uint16_t status = IPC_GET_ARG1(*call);
     
    208209            "Failed(%d) to create root hub function.\n", ret);
    209210
    210         hc_register_hub(&instance->hc, instance->rh_fun);
    211211
    212212        instance->rh_fun->ops = &rh_ops;
    213213        instance->rh_fun->driver_data = NULL;
    214         ret = ddf_fun_bind(instance->rh_fun);
    215         CHECK_RET_FINI_RETURN(ret,
    216             "Failed(%d) to register OHCI root hub.\n", ret);
     214       
     215        device->driver_data = instance;
    217216
    218217        hc_start_hw(&instance->hc);
Note: See TracChangeset for help on using the changeset viewer.