Changeset e4d7363 in mainline for uspace/drv/bus/usb/ohci/hc.h


Ignore:
Timestamp:
2017-06-22T21:34:39Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
91ca111
Parents:
cb89430
Message:

usbhost: refactor the initialization

Before that, drivers had to setup MMIO range multiple times, or even parse hw
resources themselves again. The former init method was split in half - init and
start. Init shall allocate and initialize inner structures, start shall start
the HC.

In the XHCI it is demonstrated how to isolate inner HC implementation from the
fact this driver is using libusbhost. It adds some boilerplate code, but
I think it leads to cleaner design.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/hc.h

    rcb89430 re4d7363  
    8080} hc_t;
    8181
    82 extern int hc_init(hc_t *, const hw_res_list_parsed_t *, bool);
     82extern int hc_init(hc_t *, const hw_res_list_parsed_t *);
     83extern void hc_gain_control(hc_t *instance);
     84extern void hc_start(hc_t *instance);
    8385extern void hc_fini(hc_t *);
    8486
     
    8688extern void hc_dequeue_endpoint(hc_t *, const endpoint_t *);
    8789
    88 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);
     90int ohci_hc_gen_irq_code(irq_code_t *code, hcd_t *hcd, const hw_res_list_parsed_t *hw_res);
    8991
    9092extern void ohci_hc_interrupt(hcd_t *, uint32_t);
Note: See TracChangeset for help on using the changeset viewer.