Changeset 52f1882 in mainline
- Timestamp:
- 2013-02-08T23:31:23Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- db71e2a
- Parents:
- 39339378
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_rh.c
r39339378 r52f1882 43 43 static usbvirt_device_ops_t ops; 44 44 45 /** Initialize internal USB HUB class descriptor. 46 * @param instance OHCI root hub. 47 * Use register based info to create accurate descriptor. 48 */ 45 49 static void ohci_rh_hub_desc_init(ohci_rh_t *instance) 46 50 { … … 83 87 84 88 } 85 89 /** Initialize OHCI root hub. 90 * @param instance Place to initialize. 91 * @param regs OHCI device registers. 92 * @param name Device name. 93 * return Error code, EOK on success. 94 * 95 * Selects preconfigured port powering mode, sets up descriptor, and 96 * initializes internal virtual hub. 97 */ 86 98 int ohci_rh_init(ohci_rh_t *instance, ohci_regs_t *regs, const char *name) 87 99 { … … 137 149 138 150 ohci_rh_hub_desc_init(instance); 151 instance->unfinished_interrupt_transfer = NULL; 139 152 return virthub_base_init(&instance->base, name, &ops, instance, 140 153 NULL, &instance->hub_descriptor.header, HUB_STATUS_CHANGE_PIPE); 141 154 } 142 155 156 /** Schedule USB request. 157 * @param instance OCHI root hub instance. 158 * @param batch USB requst batch to schedule. 159 * @return Always EOK. 160 * Most requests complete even before this function returns, 161 * status change requests might be postponed until there is something to report. 162 */ 143 163 int ohci_rh_schedule(ohci_rh_t *instance, usb_transfer_batch_t *batch) 144 164 { … … 165 185 } 166 186 187 /** Handle OHCI RHSC interrupt. 188 * @param instance OHCI root hub isntance. 189 * @return Always EOK. 190 * 191 * Interrupt means there is a change of status to report. It may trigger 192 * processing of a postponed request. 193 */ 167 194 int ohci_rh_interrupt(ohci_rh_t *instance) 168 195 { 196 //TODO atomic swap needed 169 197 usb_transfer_batch_t *batch = instance->unfinished_interrupt_transfer; 170 198 instance->unfinished_interrupt_transfer = NULL; … … 484 512 }; 485 513 514 /** Virtual OHCI root hub ops */ 486 515 static usbvirt_device_ops_t ops = { 487 516 .control = control_transfer_handlers,
Note:
See TracChangeset
for help on using the changeset viewer.