Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/hc.c

    r1ae74c6 r9d58539  
    3535#include <str_error.h>
    3636#include <adt/list.h>
    37 #include <ddi.h>
     37#include <libarch/ddi.h>
    3838
    3939#include <usb/debug.h>
     
    5050static const irq_pio_range_t uhci_irq_pio_ranges[] = {
    5151        {
    52                 .base = 0,
     52                .base = 0,      /* filled later */
    5353                .size = sizeof(uhci_regs_t)
    5454        }
     
    5656
    5757static 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 },
    8264};
    8365
     
    9072static int hc_debug_checker(void *arg);
    9173
    92 
     74/*----------------------------------------------------------------------------*/
    9375/** Get number of PIO ranges used in IRQ code.
    9476 * @return Number of ranges.
     
    9880        return sizeof(uhci_irq_pio_ranges) / sizeof(irq_pio_range_t);
    9981}
    100 
     82/*----------------------------------------------------------------------------*/
    10183/** Get number of commands used in IRQ code.
    10284 * @return Number of commands.
     
    10688        return sizeof(uhci_irq_commands) / sizeof(irq_cmd_t);
    10789}
    108 
     90/*----------------------------------------------------------------------------*/
    10991/** Generate IRQ code.
    11092 * @param[out] ranges PIO ranges buffer.
     
    136118        return EOK;
    137119}
    138 
     120/*----------------------------------------------------------------------------*/
    139121/** Take action based on the interrupt cause.
    140122 *
     
    193175        }
    194176}
    195 
     177/*----------------------------------------------------------------------------*/
    196178/** Initialize UHCI hc driver structure
    197179 *
     
    253235        return EOK;
    254236}
    255 
     237/*----------------------------------------------------------------------------*/
    256238/** Initialize UHCI hc hw resources.
    257239 *
     
    295277            UHCI_CMD_RUN_STOP | UHCI_CMD_MAX_PACKET | UHCI_CMD_CONFIGURE);
    296278}
    297 
     279/*----------------------------------------------------------------------------*/
    298280/** Initialize UHCI hc memory structures.
    299281 *
     
    337319        return EOK;
    338320}
    339 
     321/*----------------------------------------------------------------------------*/
    340322/** Initialize UHCI hc transfer lists.
    341323 *
     
    399381#undef CHECK_RET_CLEAR_RETURN
    400382}
    401 
     383/*----------------------------------------------------------------------------*/
    402384/** Schedule batch for execution.
    403385 *
     
    427409        return EOK;
    428410}
    429 
     411/*----------------------------------------------------------------------------*/
    430412/** Polling function, emulates interrupts.
    431413 *
     
    450432        return EOK;
    451433}
    452 
     434/*----------------------------------------------------------------------------*/
    453435/** Debug function, checks consistency of memory structures.
    454436 *
Note: See TracChangeset for help on using the changeset viewer.