Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 366e9b6 in mainline


Ignore:
Timestamp:
2017-10-13T11:13:32Z (3 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
master
Children:
c10daa8
Parents:
cb69854
Message:

usbhost: setup of the root hub is now a method of an driver

[oue]hci + vhc still use the previous implementation, renamed to hcd_setup_virtual_root_hub. xhci currently does not do anything, so the virtual hub is not created anymore.

Location:
uspace
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/main.c

    rcb69854 r366e9b6  
    6363        .claim = ehci_driver_claim,
    6464        .start = ehci_driver_start,
     65        .setup_root_hub = hcd_setup_virtual_root_hub,
    6566        .fini = ehci_driver_fini,
    6667        .ops = {
  • uspace/drv/bus/usb/ohci/main.c

    rcb69854 r366e9b6  
    5858        .claim = ohci_driver_claim,
    5959        .start = ohci_driver_start,
     60        .setup_root_hub = hcd_setup_virtual_root_hub,
    6061        .fini = ohci_driver_fini,
    6162        .name = "OHCI",
  • uspace/drv/bus/usb/uhci/main.c

    rcb69854 r366e9b6  
    6060        .init = uhci_driver_init,
    6161        .start = uhci_driver_start,
     62        .setup_root_hub = hcd_setup_virtual_root_hub,
    6263        .fini = uhci_driver_fini,
    6364        .name = "UHCI",
  • uspace/drv/bus/usb/vhc/main.c

    rcb69854 r366e9b6  
    111111         * needs to be ready at this time.
    112112         */
    113         ret = hcd_ddf_setup_root_hub(dev);
     113        ret = hcd_setup_virtual_root_hub(dev);
    114114        if (ret != EOK) {
    115115                usb_log_error("Failed to init VHC root hub: %s\n",
  • uspace/lib/usbhost/include/usb/host/ddf_helpers.h

    rcb69854 r366e9b6  
    4949typedef int (*claim_t)(hcd_t *, ddf_dev_t *);
    5050typedef int (*driver_start_t)(hcd_t *, bool irq);
     51typedef int (*setup_root_hub_t)(ddf_dev_t *);
    5152
    5253typedef void (*driver_stop_t)(hcd_t *);
     
    6869        irq_code_gen_t irq_code_gen;       /**< Generate IRQ handling code */
    6970        driver_start_t start;              /**< Start the HC */
     71        setup_root_hub_t setup_root_hub;   /**< Setup the root hub */
    7072
    7173        /* Destruction sequence: */
     
    7880int hcd_ddf_setup_hc(ddf_dev_t *device);
    7981void hcd_ddf_clean_hc(ddf_dev_t *device);
    80 int hcd_ddf_setup_root_hub(ddf_dev_t *device);
     82
     83int hcd_setup_virtual_root_hub(ddf_dev_t *);
    8184
    8285hcd_t *dev_to_hcd(ddf_dev_t *dev);
  • uspace/lib/usbhost/src/ddf_helpers.c

    rcb69854 r366e9b6  
    617617 * @return Error code
    618618 */
    619 int hcd_ddf_setup_root_hub(ddf_dev_t *device)
     619int hcd_setup_virtual_root_hub(ddf_dev_t *device)
    620620{
    621621        assert(device);
     
    919919         * needs to be ready at this time.
    920920         */
    921         ret = hcd_ddf_setup_root_hub(device);
     921        if (driver->setup_root_hub)
     922                ret = driver->setup_root_hub(device);
    922923        if (ret != EOK) {
    923924                usb_log_error("Failed to setup HC root hub: %s.\n",
Note: See TracChangeset for help on using the changeset viewer.