Changes in uspace/drv/bus/usb/uhci/hc.h [58563585:b5111c46] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.h
r58563585 rb5111c46 33 33 * @brief UHCI host controller driver structure 34 34 */ 35 36 35 #ifndef DRV_UHCI_HC_H 37 36 #define DRV_UHCI_HC_H 38 37 38 #include <ddf/driver.h> 39 #include <ddf/interrupt.h> 39 40 #include <device/hw_res_parsed.h> 40 41 #include <fibril.h> 41 #include <macros.h>42 #include <stdbool.h>43 #include <sys/types.h>44 42 #include <usb/host/hcd.h> 45 #include <usb/host/usb_transfer_batch.h>46 43 47 #include "uhci_rh.h"48 44 #include "transfer_list.h" 49 #include "hw_struct/link_pointer.h"50 45 51 46 /** UHCI I/O registers layout */ … … 88 83 /** SOF modification to match external timers */ 89 84 ioport8_t sofmod; 90 91 PADD8[3];92 ioport16_t ports[];93 85 } uhci_regs_t; 94 86 95 87 #define UHCI_FRAME_LIST_COUNT 1024 88 #define UHCI_INT_EMULATOR_TIMEOUT 10000 96 89 #define UHCI_DEBUGER_TIMEOUT 5000000 97 90 #define UHCI_ALLOWED_HW_FAIL 5 91 #define UHCI_NEEDED_IRQ_COMMANDS 5 98 92 99 93 /** Main UHCI driver structure */ 100 94 typedef struct hc { 101 uhci_rh_t rh; 95 /** Generic HCD driver structure */ 96 hcd_t *generic; 97 102 98 /** Addresses of I/O registers */ 103 99 uhci_regs_t *registers; … … 117 113 /** Pointer table to the above lists, helps during scheduling */ 118 114 transfer_list_t *transfers[2][4]; 115 /** Fibril periodically checking status register*/ 116 fid_t interrupt_emulator; 119 117 /** Indicator of hw interrupts availability */ 120 118 bool hw_interrupts; … … 124 122 } hc_t; 125 123 126 extern int hc_init(hc_t *, const hw_res_list_parsed_t *, bool); 127 extern void hc_fini(hc_t *); 124 int hc_register_irq_handler(ddf_dev_t *, addr_range_t *, int, 125 interrupt_handler_t); 126 int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t, 127 addr_range_t *); 128 void hc_interrupt(hc_t *instance, uint16_t status); 129 int hc_init(hc_t *, ddf_fun_t *, addr_range_t *, bool); 128 130 129 extern int uhci_hc_gen_irq_code(irq_code_t *, const hw_res_list_parsed_t *); 130 131 extern void uhci_hc_interrupt(hcd_t *, uint32_t); 132 extern int uhci_hc_status(hcd_t *, uint32_t *); 133 extern int uhci_hc_schedule(hcd_t *, usb_transfer_batch_t *); 134 131 /** Safely dispose host controller internal structures 132 * 133 * @param[in] instance Host controller structure to use. 134 */ 135 static inline void hc_fini(hc_t *instance) {} /* TODO: implement*/ 135 136 #endif 136 137
Note:
See TracChangeset
for help on using the changeset viewer.