Changeset 366e9b6 in mainline for uspace/lib/usbhost


Ignore:
Timestamp:
2017-10-13T11:13:32Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
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/lib/usbhost
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.