Changeset 5fe0a69 in mainline for uspace/drv/bus/usb/uhci/hc.c


Ignore:
Timestamp:
2011-08-24T14:40:26Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3afb758
Parents:
df8f3fa
Message:

UHCI: Use new usb hc driver architecture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/hc.c

    rdf8f3fa r5fe0a69  
    4141
    4242#include "hc.h"
     43#include "batch.h"
    4344
    4445#define UHCI_INTR_ALLOW_INTERRUPTS \
     
    4647#define UHCI_STATUS_USED_INTERRUPTS \
    4748    (UHCI_STATUS_INTERRUPT | UHCI_STATUS_ERROR_INTERRUPT)
     49
     50static int schedule(hcd_t *hcd, usb_transfer_batch_t *batch)
     51{
     52        assert(hcd);
     53        return hc_schedule(hcd->private_data, batch);
     54}
    4855
    4956static const irq_cmd_t uhci_irq_commands[] =
     
    131138        usb_log_debug(
    132139            "Device registers at %p (%zuB) accessible.\n", io, reg_size);
     140        hcd_init(&instance->generic, BANDWIDTH_AVAILABLE_USB11);
     141        instance->generic.private_data = instance;
     142        instance->generic.schedule = schedule;
     143        instance->generic.batch_private_ctor = uhci_transfer_batch_create;
     144        instance->generic.batch_private_dtor = uhci_transfer_batch_dispose;
    133145
    134146        ret = hc_init_mem_structures(instance);
Note: See TracChangeset for help on using the changeset viewer.