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