Changeset fd9f6e4c in mainline


Ignore:
Timestamp:
2011-03-20T22:24:56Z (13 years ago)
Author:
Matus Dekanek <smekideki@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
33577f81, 41ef5b9
Parents:
09daa8b (diff), e7bc999 (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 with usb/development

Files:
16 added
5 edited

Legend:

Unmodified
Added
Removed
  • .bzrignore

    r09daa8b rfd9f6e4c  
    8484./uspace/drv/test1/test1
    8585./uspace/drv/test2/test2
     86./uspace/drv/ohci/ohci
    8687./uspace/drv/ehci-hcd/ehci-hcd
    8788./uspace/drv/uhci-hcd/uhci-hcd
  • boot/arch/amd64/Makefile.inc

    r09daa8b rfd9f6e4c  
    4444        ns8250 \
    4545        ehci-hcd \
     46        ohci \
    4647        uhci-hcd \
    4748        uhci-rhd \
  • uspace/Makefile

    r09daa8b rfd9f6e4c  
    118118                srv/hw/irc/i8259 \
    119119                drv/ehci-hcd \
     120                drv/ohci \
    120121                drv/uhci-hcd \
    121122                drv/uhci-rhd \
     
    136137                srv/hw/irc/i8259 \
    137138                drv/ehci-hcd \
     139                drv/ohci \
    138140                drv/uhci-hcd \
    139141                drv/uhci-rhd \
  • uspace/drv/ehci-hcd/Makefile

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

    r09daa8b rfd9f6e4c  
    4444
    4545#include "pci.h"
    46 
    47 #define NAME "ehci-hcd"
     46#include "ehci.h"
    4847
    4948static int ehci_add_device(ddf_dev_t *device);
     
    5756        .driver_ops = &ehci_driver_ops
    5857};
     58static ddf_dev_ops_t hc_ops = {
     59        .interfaces[USBHC_DEV_IFACE] = &ehci_hc_iface,
     60};
     61
    5962/*----------------------------------------------------------------------------*/
    6063/** Initializes a new ddf driver instance of EHCI hcd.
     
    7174        return ret; \
    7275}
    73 
    74         usb_log_info("uhci_add_device() called\n");
    7576
    7677        uintptr_t mem_reg_base = 0;
     
    8990            "Failed(%d) disable legacy USB: %s.\n", ret, str_error(ret));
    9091
     92        ddf_fun_t *hc_fun = ddf_fun_create(device, fun_exposed, "ehci-hc");
     93        if (hc_fun == NULL) {
     94                usb_log_error("Failed to create EHCI function.\n");
     95                return ENOMEM;
     96        }
     97        hc_fun->ops = &hc_ops;
     98        ret = ddf_fun_bind(hc_fun);
     99
     100        CHECK_RET_RETURN(ret,
     101            "Failed to bind EHCI function: %s.\n",
     102            str_error(ret));
     103
     104        usb_log_info("Controlling new EHCI device `%s' (handle %llu).\n",
     105            device->name, device->handle);
     106
    91107        return EOK;
    92108#undef CHECK_RET_RETURN
     
    103119int main(int argc, char *argv[])
    104120{
    105         usb_log_enable(USB_LOG_LEVEL_ERROR, NAME);
     121        usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME);
    106122        return ddf_driver_main(&ehci_driver);
    107123}
Note: See TracChangeset for help on using the changeset viewer.