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


Ignore:
Timestamp:
2011-12-18T14:02:30Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c868e2d
Parents:
3b71e84d (diff), 1761268 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r3b71e84d r7aaed09  
    4242#include <usb/ddfiface.h>
    4343#include <usb/debug.h>
     44#include <usb/host/hcd.h>
    4445
    4546#include "pci.h"
    46 #include "ehci.h"
    4747
    48 static int ehci_add_device(ddf_dev_t *device);
     48#define NAME "ehci"
     49
     50static int ehci_dev_add(ddf_dev_t *device);
    4951/*----------------------------------------------------------------------------*/
    5052static driver_ops_t ehci_driver_ops = {
    51         .add_device = ehci_add_device,
     53        .dev_add = ehci_dev_add,
    5254};
    5355/*----------------------------------------------------------------------------*/
     
    5759};
    5860static ddf_dev_ops_t hc_ops = {
    59         .interfaces[USBHC_DEV_IFACE] = &ehci_hc_iface,
     61        .interfaces[USBHC_DEV_IFACE] = &hcd_iface,
    6062};
    6163
     
    6668 * @return Error code.
    6769 */
    68 static int ehci_add_device(ddf_dev_t *device)
     70static int ehci_dev_add(ddf_dev_t *device)
    6971{
    7072        assert(device);
     
    9597                return ENOMEM;
    9698        }
     99        hcd_t *ehci_hc = ddf_fun_data_alloc(hc_fun, sizeof(hcd_t));
     100        if (ehci_hc == NULL) {
     101                usb_log_error("Failed to alloc generic HC driver.\n");
     102                return ENOMEM;
     103        }
     104        /* High Speed, no bandwidth */
     105        hcd_init(ehci_hc, USB_SPEED_HIGH, 0, NULL);
    97106        hc_fun->ops = &hc_ops;
    98107
Note: See TracChangeset for help on using the changeset viewer.