Changeset e4d7363 in mainline for uspace/drv/bus/usb/uhci/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/uhci/hc.h

    rcb89430 re4d7363  
    124124} hc_t;
    125125
    126 extern int hc_init(hc_t *, const hw_res_list_parsed_t *, bool);
     126extern int hc_init(hc_t *, const hw_res_list_parsed_t *);
     127extern void hc_start(hc_t *);
    127128extern void hc_fini(hc_t *);
    128129
    129 extern int uhci_hc_gen_irq_code(irq_code_t *, const hw_res_list_parsed_t *);
     130extern int uhci_hc_gen_irq_code(irq_code_t *, hcd_t *,const hw_res_list_parsed_t *);
    130131
    131132extern void uhci_hc_interrupt(hcd_t *, uint32_t);
Note: See TracChangeset for help on using the changeset viewer.