Changeset 302a4b6 in mainline


Ignore:
Timestamp:
2011-04-23T10:08:47Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8986412
Parents:
af81980
Message:

Add UHCI pseudocode interrupt sharing

Location:
uspace/drv/uhci-hcd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/hc.c

    raf81980 r302a4b6  
    4444#include "hc.h"
    4545
    46 #define UHCI_SUPPORTED_INTERRUPTS \
     46#define UHCI_STATUS_ALLOW_INTERRUPTS \
    4747    (UHCI_INTR_CRC | UHCI_INTR_COMPLETE | UHCI_INTR_SHORT_PACKET)
     48
    4849
    4950static int hc_init_transfer_lists(hc_t *instance);
     
    138139                /* Enable all interrupts, but resume interrupt */
    139140                pio_write_16(&instance->registers->usbintr,
    140                     UHCI_SUPPORTED_INTERRUPTS);
     141                    UHCI_STATUS_ALLOW_INTERRUPTS);
    141142        }
    142143
     
    182183                instance->interrupt_commands[1].cmd = CMD_BTEST;
    183184                instance->interrupt_commands[1].value =
    184                     UHCI_SUPPORTED_INTERRUPTS;
     185                    UHCI_STATUS_ALLOW_INTERRUPTS | UHCI_STATUS_NM_INTERRUPTS;
    185186                instance->interrupt_commands[1].srcarg = 1;
    186187                instance->interrupt_commands[1].dstarg = 2;
     
    215216
    216217        /* Set all frames to point to the first queue head */
    217         const uint32_t queue =
    218             LINK_POINTER_QH(addr_to_phys(
    219                 instance->transfers_interrupt.queue_head));
     218        const uint32_t queue = LINK_POINTER_QH(
     219                addr_to_phys(instance->transfers_interrupt.queue_head));
    220220
    221221        unsigned i = 0;
     
    279279#ifdef FSBR
    280280        transfer_list_set_next(&instance->transfers_bulk_full,
    281                 &instance->transfers_control_full);
     281            &instance->transfers_control_full);
    282282#endif
    283283
     
    332332{
    333333        assert(instance);
     334        usb_log_info("Got interrupt: %x.\n", status);
    334335        /* Lower 2 bits are transaction error and transaction complete */
    335336        if (status & (UHCI_STATUS_INTERRUPT | UHCI_STATUS_ERROR_INTERRUPT)) {
     
    353354        }
    354355        /* Resume interrupts are not supported */
     356        if (status & UHCI_STATUS_RESUME) {
     357                usb_log_error("Resume interrupt!\n");
     358        }
    355359
    356360        /* Bits 4 and 5 indicate hc error */
  • uspace/drv/uhci-hcd/hc.h

    raf81980 r302a4b6  
    6969#define UHCI_STATUS_ERROR_INTERRUPT (1 << 1)
    7070#define UHCI_STATUS_INTERRUPT (1 << 0)
     71#define UHCI_STATUS_NM_INTERRUPTS \
     72    (UHCI_STATUS_PROCESS_ERROR | UHCI_STATUS_SYSTEM_ERROR)
    7173
    7274        /** Interrupt enabled registers */
Note: See TracChangeset for help on using the changeset viewer.