Changeset f51594fa in mainline


Ignore:
Timestamp:
2011-03-19T17:40:15Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
81608b5
Parents:
382f3266
Message:

Add EHCI stub for HC interface

Location:
uspace/drv/ehci-hcd
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ehci-hcd/Makefile

    r382f3266 rf51594fa  
    3333
    3434SOURCES = \
     35        hc_iface.c \
    3536        main.c \
    3637        pci.c
  • uspace/drv/ehci-hcd/main.c

    r382f3266 rf51594fa  
    4444
    4545#include "pci.h"
     46#include "ehci.h"
    4647
    4748#define NAME "ehci-hcd"
     
    5758        .driver_ops = &ehci_driver_ops
    5859};
     60static ddf_dev_ops_t hc_ops = {
     61        .interfaces[USBHC_DEV_IFACE] = &ehci_hc_iface,
     62};
     63
    5964/*----------------------------------------------------------------------------*/
    6065/** Initializes a new ddf driver instance of EHCI hcd.
     
    8994            "Failed(%d) disable legacy USB: %s.\n", ret, str_error(ret));
    9095
     96        ddf_fun_t *hc_fun = ddf_fun_create(device, fun_exposed, "ehci-hc");
     97        if (hc_fun == NULL) {
     98                usb_log_error("Failed to create EHCI function.\n");
     99                return ENOMEM;
     100        }
     101        hc_fun->ops = &hc_ops;
     102        ret = ddf_fun_bind(hc_fun);
     103
     104        CHECK_RET_RETURN(ret,
     105            "Failed to bind EHCI function: %s.\n",
     106            str_error(ret));
     107
    91108        return EOK;
    92109#undef CHECK_RET_RETURN
Note: See TracChangeset for help on using the changeset viewer.