Changeset 26e7d6d in mainline for uspace/drv/bus/usb/uhci/hc.h
- Timestamp:
- 2011-09-19T16:31:00Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a347a11
- Parents:
- 3842a955 (diff), 086290d (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 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.h
r3842a955 r26e7d6d 39 39 #include <ddi.h> 40 40 41 #include <usb/host/device_keeper.h> 42 #include <usb/host/usb_endpoint_manager.h> 43 #include <usb/host/batch.h> 41 #include <usb/host/hcd.h> 44 42 45 43 #include "transfer_list.h" … … 84 82 /** SOF modification to match external timers */ 85 83 uint8_t sofmod; 86 } regs_t;84 } uhci_regs_t; 87 85 88 86 #define UHCI_FRAME_LIST_COUNT 1024 … … 94 92 /** Main UHCI driver structure */ 95 93 typedef struct hc { 96 /** USB bus driver, devices and addresses */ 97 usb_device_keeper_t manager; 98 /** USB bus driver, endpoints */ 99 usb_endpoint_manager_t ep_manager; 94 /** Generic HCD driver structure */ 95 hcd_t generic; 100 96 101 97 /** Addresses of I/O registers */ 102 regs_t *registers;98 uhci_regs_t *registers; 103 99 104 100 /** Frame List contains 1024 link pointers */ … … 116 112 /** Pointer table to the above lists, helps during scheduling */ 117 113 transfer_list_t *transfers[2][4]; 118 119 /** Code to be executed in kernel interrupt handler */120 irq_code_t interrupt_code;121 122 /** Commands that form interrupt code */123 irq_cmd_t interrupt_commands[UHCI_NEEDED_IRQ_COMMANDS];124 125 114 /** Fibril periodically checking status register*/ 126 115 fid_t interrupt_emulator; 127 128 116 /** Indicator of hw interrupts availability */ 129 117 bool hw_interrupts; … … 133 121 } hc_t; 134 122 123 size_t hc_irq_cmd_count(void); 124 int hc_get_irq_commands( 125 irq_cmd_t cmds[], size_t cmd_size, uintptr_t regs, size_t reg_size); 126 void hc_interrupt(hc_t *instance, uint16_t status); 135 127 int hc_init(hc_t *instance, void *regs, size_t reg_size, bool interupts); 136 137 int hc_schedule(hc_t *instance, usb_transfer_batch_t *batch);138 139 void hc_interrupt(hc_t *instance, uint16_t status);140 128 141 129 /** Safely dispose host controller internal structures … … 143 131 * @param[in] instance Host controller structure to use. 144 132 */ 145 static inline void hc_fini(hc_t *instance) { /* TODO: implement*/ }; 146 147 /** Get and cast pointer to the driver data 148 * 149 * @param[in] fun DDF function pointer 150 * @return cast pointer to driver_data 151 */ 152 static inline hc_t * fun_to_hc(ddf_fun_t *fun) 153 { 154 assert(fun); 155 return fun->driver_data; 156 } 133 static inline void hc_fini(hc_t *instance) {} /* TODO: implement*/ 157 134 #endif 158 135 /**
Note:
See TracChangeset
for help on using the changeset viewer.