Changeset a799708 in mainline for uspace/drv/bus/usb/ehci/main.c


Ignore:
Timestamp:
2015-07-04T01:49:47Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d51ba359
Parents:
8d7552c
Message:

ehci,ohci,uhci: Switch to generic hc drv initialization function

File:
1 edited

Legend:

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

    r8d7552c ra799708  
    8989
    9090
     91static const ddf_hc_driver_t ehci_hc_driver = {
     92        .claim = disable_legacy,
     93        .hc_speed = USB_SPEED_HIGH,
     94        .irq_code_gen = ehci_hc_gen_irq_code,
     95        .init = ehci_driver_init,
     96        .fini = ehci_driver_fini,
     97        .name = "EHCI-PCI"
     98};
     99
    91100/** Initializes a new ddf driver instance of EHCI hcd.
    92101 *
     
    99108        assert(device);
    100109
    101         int ret = disable_legacy(device);
    102         if (ret != EOK) {
    103                 usb_log_error("Failed to disable EHCI legacy support: %s\n",
    104                     str_error(ret));
    105                 return ret;
    106         }
     110        return hcd_ddf_add_hc(device, &ehci_hc_driver);
    107111
    108         ret = ddf_hcd_device_setup_all(device, USB_SPEED_HIGH,
    109             BANDWIDTH_AVAILABLE_USB20, bandwidth_count_usb11,
    110             ddf_hcd_gen_irq_handler, ehci_hc_gen_irq_code,
    111             ehci_driver_init, ehci_driver_fini);
    112         if (ret != EOK) {
    113                 usb_log_error("Failed to initialize EHCI driver: %s.\n",
    114                     str_error(ret));
    115                 return ret;
    116         }
    117         usb_log_info("Controlling new EHCI device '%s'.\n",
    118             ddf_dev_get_name(device));
    119 
    120         return EOK;
    121112}
    122113
Note: See TracChangeset for help on using the changeset viewer.