Changes in uspace/drv/bus/usb/uhci/hc.c [1ae74c6:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.c
r1ae74c6 r9d58539 35 35 #include <str_error.h> 36 36 #include <adt/list.h> 37 #include < ddi.h>37 #include <libarch/ddi.h> 38 38 39 39 #include <usb/debug.h> … … 50 50 static const irq_pio_range_t uhci_irq_pio_ranges[] = { 51 51 { 52 .base = 0, 52 .base = 0, /* filled later */ 53 53 .size = sizeof(uhci_regs_t) 54 54 } … … 56 56 57 57 static const irq_cmd_t uhci_irq_commands[] = { 58 { 59 .cmd = CMD_PIO_READ_16, 60 .dstarg = 1, 61 .addr = NULL 62 }, 63 { 64 .cmd = CMD_AND, 65 .srcarg = 1, 66 .dstarg = 2, 67 .value = UHCI_STATUS_USED_INTERRUPTS | UHCI_STATUS_NM_INTERRUPTS 68 }, 69 { 70 .cmd = CMD_PREDICATE, 71 .srcarg = 2, 72 .value = 2 73 }, 74 { 75 .cmd = CMD_PIO_WRITE_A_16, 76 .srcarg = 1, 77 .addr = NULL 78 }, 79 { 80 .cmd = CMD_ACCEPT 81 } 58 { .cmd = CMD_PIO_READ_16, .dstarg = 1, .addr = NULL/*filled later*/}, 59 { .cmd = CMD_BTEST, .srcarg = 1, .dstarg = 2, 60 .value = UHCI_STATUS_USED_INTERRUPTS | UHCI_STATUS_NM_INTERRUPTS }, 61 { .cmd = CMD_PREDICATE, .srcarg = 2, .value = 2 }, 62 { .cmd = CMD_PIO_WRITE_A_16, .srcarg = 1, .addr = NULL/*filled later*/}, 63 { .cmd = CMD_ACCEPT }, 82 64 }; 83 65 … … 90 72 static int hc_debug_checker(void *arg); 91 73 92 74 /*----------------------------------------------------------------------------*/ 93 75 /** Get number of PIO ranges used in IRQ code. 94 76 * @return Number of ranges. … … 98 80 return sizeof(uhci_irq_pio_ranges) / sizeof(irq_pio_range_t); 99 81 } 100 82 /*----------------------------------------------------------------------------*/ 101 83 /** Get number of commands used in IRQ code. 102 84 * @return Number of commands. … … 106 88 return sizeof(uhci_irq_commands) / sizeof(irq_cmd_t); 107 89 } 108 90 /*----------------------------------------------------------------------------*/ 109 91 /** Generate IRQ code. 110 92 * @param[out] ranges PIO ranges buffer. … … 136 118 return EOK; 137 119 } 138 120 /*----------------------------------------------------------------------------*/ 139 121 /** Take action based on the interrupt cause. 140 122 * … … 193 175 } 194 176 } 195 177 /*----------------------------------------------------------------------------*/ 196 178 /** Initialize UHCI hc driver structure 197 179 * … … 253 235 return EOK; 254 236 } 255 237 /*----------------------------------------------------------------------------*/ 256 238 /** Initialize UHCI hc hw resources. 257 239 * … … 295 277 UHCI_CMD_RUN_STOP | UHCI_CMD_MAX_PACKET | UHCI_CMD_CONFIGURE); 296 278 } 297 279 /*----------------------------------------------------------------------------*/ 298 280 /** Initialize UHCI hc memory structures. 299 281 * … … 337 319 return EOK; 338 320 } 339 321 /*----------------------------------------------------------------------------*/ 340 322 /** Initialize UHCI hc transfer lists. 341 323 * … … 399 381 #undef CHECK_RET_CLEAR_RETURN 400 382 } 401 383 /*----------------------------------------------------------------------------*/ 402 384 /** Schedule batch for execution. 403 385 * … … 427 409 return EOK; 428 410 } 429 411 /*----------------------------------------------------------------------------*/ 430 412 /** Polling function, emulates interrupts. 431 413 * … … 450 432 return EOK; 451 433 } 452 434 /*----------------------------------------------------------------------------*/ 453 435 /** Debug function, checks consistency of memory structures. 454 436 *
Note:
See TracChangeset
for help on using the changeset viewer.