Changes in uspace/drv/bus/usb/ohci/hc.h [507c6f3:58563585] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hc.h
r507c6f3 r58563585 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 28 29 /** @addtogroup drvusbohci 29 30 * @{ … … 32 33 * @brief OHCI host controller driver structure 33 34 */ 35 34 36 #ifndef DRV_OHCI_HC_H 35 37 #define DRV_OHCI_HC_H 36 38 37 #include <ddf/interrupt.h> 39 #include <adt/list.h> 40 #include <ddi.h> 41 #include <ddf/driver.h> 42 #include <device/hw_res_parsed.h> 38 43 #include <fibril.h> 39 44 #include <fibril_synch.h> 40 #include < adt/list.h>41 #include < ddi.h>45 #include <stdbool.h> 46 #include <sys/types.h> 42 47 43 #include <usb/usb.h>44 48 #include <usb/host/hcd.h> 49 #include <usb/host/endpoint.h> 50 #include <usb/host/usb_transfer_batch.h> 45 51 46 #include "ohci_batch.h"47 52 #include "ohci_regs.h" 48 #include " root_hub.h"53 #include "ohci_rh.h" 49 54 #include "endpoint_list.h" 50 55 #include "hw_struct/hcca.h" … … 52 57 /** Main OHCI driver structure */ 53 58 typedef struct hc { 54 /** Generic USB hc driver */55 hcd_t generic;56 57 59 /** Memory mapped I/O registers area */ 58 60 ohci_regs_t *registers; … … 71 73 fibril_mutex_t guard; 72 74 75 /** interrupts available */ 76 bool hw_interrupts; 77 73 78 /** USB hub emulation structure */ 74 rh_t rh;79 ohci_rh_t rh; 75 80 } hc_t; 76 81 77 int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t, uintptr_t, 78 size_t); 79 int hc_register_irq_handler(ddf_dev_t *, uintptr_t, size_t, int, interrupt_handler_t); 80 int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun); 81 int hc_init(hc_t *instance, uintptr_t regs, size_t reg_size, bool interrupts); 82 extern int hc_init(hc_t *, const hw_res_list_parsed_t *, bool); 83 extern void hc_fini(hc_t *); 82 84 83 /** Safely dispose host controller internal structures 84 * 85 * @param[in] instance Host controller structure to use. 86 */ 87 static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ }; 85 extern void hc_enqueue_endpoint(hc_t *, const endpoint_t *); 86 extern void hc_dequeue_endpoint(hc_t *, const endpoint_t *); 88 87 89 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep); 90 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep); 88 int ohci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res); 91 89 92 void hc_interrupt(hc_t *instance, uint32_t status); 90 extern void ohci_hc_interrupt(hcd_t *, uint32_t); 91 extern int ohci_hc_status(hcd_t *, uint32_t *); 92 extern int ohci_hc_schedule(hcd_t *, usb_transfer_batch_t *); 93 93 94 #endif 95 94 96 /** 95 97 * @}
Note:
See TracChangeset
for help on using the changeset viewer.