Changeset c9e954c in mainline for uspace/drv/bus/usb/ehci/hc.c
- Timestamp:
- 2014-01-18T22:37:06Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 615abda
- Parents:
- fccf289
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hc.c
rfccf289 rc9e954c 95 95 /** Generate IRQ code. 96 96 * @param[out] ranges PIO ranges buffer. 97 * @param[in] ranges_size Size of the ranges buffer (bytes).98 * @param[out] cmds Commands buffer.99 * @param[in] cmds_size Size of the commands buffer (bytes).100 97 * @param[in] hw_res Device's resources. 101 98 * 102 99 * @return Error code. 103 100 */ 104 int hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res)101 int ehci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res) 105 102 { 106 103 assert(code); … … 215 212 } 216 213 214 int ehci_hc_status(hcd_t *hcd, uint32_t *status) 215 { 216 assert(hcd); 217 hc_t *instance = hcd->driver.data; 218 assert(instance); 219 assert(status); 220 *status = 0; 221 if (instance->registers) { 222 *status = EHCI_RD(instance->registers->usbsts); 223 EHCI_WR(instance->registers->usbsts, *status); 224 } 225 return EOK; 226 } 227 217 228 /** Add USB transfer to the schedule. 218 229 * 219 * @param[in] instance EHCI hcdriver structure.230 * @param[in] hcd HCD driver structure. 220 231 * @param[in] batch Batch representing the transfer. 221 232 * @return Error code. 222 233 */ 223 int hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch)234 int ehci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch) 224 235 { 225 236 assert(hcd); … … 237 248 /** Interrupt handling routine 238 249 * 239 * @param[in] instance EHCI hcdriver structure.250 * @param[in] hcd HCD driver structure. 240 251 * @param[in] status Value of the status register at the time of interrupt. 241 252 */ 242 void hc_interrupt(hcd_t *hcd, uint32_t status)253 void ehci_hc_interrupt(hcd_t *hcd, uint32_t status) 243 254 { 244 255 assert(hcd);
Note:
See TracChangeset
for help on using the changeset viewer.