Changeset b4b534ac in mainline for uspace/drv/bus/usb/uhci/hc.h
- Timestamp:
- 2016-07-22T08:24:47Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.h
r5b18137 rb4b534ac 36 36 #define DRV_UHCI_HC_H 37 37 38 #include <ddf/driver.h>39 #include <ddf/interrupt.h>40 38 #include <device/hw_res_parsed.h> 41 39 #include <fibril.h> 40 #include <macros.h> 41 #include <stdbool.h> 42 #include <sys/types.h> 42 43 #include <usb/host/hcd.h> 44 #include <usb/host/usb_transfer_batch.h> 43 45 46 #include "uhci_rh.h" 44 47 #include "transfer_list.h" 48 #include "hw_struct/link_pointer.h" 45 49 46 50 /** UHCI I/O registers layout */ … … 83 87 /** SOF modification to match external timers */ 84 88 ioport8_t sofmod; 89 90 PADD8[3]; 91 ioport16_t ports[]; 85 92 } uhci_regs_t; 86 93 87 94 #define UHCI_FRAME_LIST_COUNT 1024 88 #define UHCI_INT_EMULATOR_TIMEOUT 1000089 95 #define UHCI_DEBUGER_TIMEOUT 5000000 90 96 #define UHCI_ALLOWED_HW_FAIL 5 91 #define UHCI_NEEDED_IRQ_COMMANDS 592 97 93 98 /** Main UHCI driver structure */ 94 99 typedef struct hc { 95 /** Generic HCD driver structure */ 96 hcd_t *generic; 97 100 uhci_rh_t rh; 98 101 /** Addresses of I/O registers */ 99 102 uhci_regs_t *registers; … … 113 116 /** Pointer table to the above lists, helps during scheduling */ 114 117 transfer_list_t *transfers[2][4]; 115 /** Fibril periodically checking status register*/116 fid_t interrupt_emulator;117 118 /** Indicator of hw interrupts availability */ 118 119 bool hw_interrupts; … … 122 123 } hc_t; 123 124 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); 125 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interupts); 126 void hc_fini(hc_t *instance); 130 127 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*/ 128 int uhci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res); 129 130 void uhci_hc_interrupt(hcd_t *hcd, uint32_t status); 131 int uhci_hc_status(hcd_t *hcd, uint32_t *status); 132 int uhci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch); 133 136 134 #endif 137 135
Note:
See TracChangeset
for help on using the changeset viewer.