Changeset 48fe0c9 in mainline for uspace/drv/ohci/root_hub.c


Ignore:
Timestamp:
2011-03-21T13:43:27Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
361e61b, 5971dd3, 8a951ca
Parents:
0e45e7f (diff), 925e099 (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:

OHCI hc driver software side implementation

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/root_hub.c

    r0e45e7f r48fe0c9  
    3838#include <usb/debug.h>
    3939
    40 #include "ohci_rh.h"
     40#include "root_hub.h"
    4141
    4242/** Root hub initialization
    4343 * @return Error code.
    4444 */
    45 int ohci_rh_init(ohci_rh_t *instance, ohci_regs_t *regs)
     45int rh_init(rh_t *instance, ddf_dev_t *dev, ohci_regs_t *regs)
    4646{
    4747        assert(instance);
    48         instance->address = 0;
     48        instance->address = -1;
    4949        instance->registers = regs;
     50        instance->device = dev;
    5051
    5152        usb_log_info("OHCI root hub with %d ports.\n", regs->rh_desc_a & 0xff);
     
    5556}
    5657/*----------------------------------------------------------------------------*/
    57 void ohci_rh_request(ohci_rh_t *instance, batch_t *request)
     58int rh_request(rh_t *instance, batch_t *request)
    5859{
     60        assert(instance);
     61        assert(request);
    5962        /* TODO: implement */
     63        if (request->setup_buffer) {
     64                usb_log_info("Root hub got SETUP packet: %s.\n",
     65                    usb_debug_str_buffer((const uint8_t *)request->setup_buffer, 8, 8));
     66        }
     67        usb_log_error("Root hub request processing not implemented.\n");
     68        batch_finish(request, ENOTSUP);
     69        return EOK;
    6070}
    6171/*----------------------------------------------------------------------------*/
    62 void ohci_rh_interrupt(ohci_rh_t *instance)
     72void rh_interrupt(rh_t *instance)
    6373{
    64         usb_log_info("Interrupt!!.\n");
     74        usb_log_error("Root hub interrupt not implemented.\n");
    6575        /* TODO: implement */
    6676}
Note: See TracChangeset for help on using the changeset viewer.