Ignore:
File:
1 edited

Legend:

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

    r302a4b6 r6ce42e85  
    4848#include "transfer_list.h"
    4949
    50 /** UHCI I/O registers layout */
    5150typedef struct uhci_regs {
    52         /** Command register, controls HC behaviour */
    5351        uint16_t usbcmd;
    5452#define UHCI_CMD_MAX_PACKET (1 << 7)
     
    6159#define UHCI_CMD_RUN_STOP  (1 << 0)
    6260
    63         /** Status register, 1 means interrupt is asserted (if enabled) */
    6461        uint16_t usbsts;
    6562#define UHCI_STATUS_HALTED (1 << 5)
     
    6966#define UHCI_STATUS_ERROR_INTERRUPT (1 << 1)
    7067#define UHCI_STATUS_INTERRUPT (1 << 0)
    71 #define UHCI_STATUS_NM_INTERRUPTS \
    72     (UHCI_STATUS_PROCESS_ERROR | UHCI_STATUS_SYSTEM_ERROR)
    7368
    74         /** Interrupt enabled registers */
    7569        uint16_t usbintr;
    7670#define UHCI_INTR_SHORT_PACKET (1 << 3)
     
    7973#define UHCI_INTR_CRC (1 << 0)
    8074
    81         /** Register stores frame number used in SOF packet */
    8275        uint16_t frnum;
    83 
    84         /** Pointer(physical) to the Frame List */
    8576        uint32_t flbaseadd;
    86 
    87         /** SOF modification to match external timers */
    8877        uint8_t sofmod;
    8978} regs_t;
    9079
    9180#define UHCI_FRAME_LIST_COUNT 1024
    92 #define UHCI_INT_EMULATOR_TIMEOUT 10000
     81#define UHCI_CLEANER_TIMEOUT 10000
    9382#define UHCI_DEBUGER_TIMEOUT 5000000
    9483#define UHCI_ALLOWED_HW_FAIL 5
    95 #define UHCI_NEEDED_IRQ_COMMANDS 5
    9684
    97 /* Main HC driver structure */
    9885typedef struct hc {
    99         /** USB bus driver, devices and addresses */
    10086        usb_device_keeper_t manager;
    101         /** USB bus driver, endpoints */
    10287        usb_endpoint_manager_t ep_manager;
    10388
    104         /** Addresses of I/O registers */
    10589        regs_t *registers;
    10690
    107         /** Frame List contains 1024 link pointers */
    10891        link_pointer_t *frame_list;
    10992
    110         /** List and queue of interrupt transfers */
     93        transfer_list_t transfers_bulk_full;
     94        transfer_list_t transfers_control_full;
     95        transfer_list_t transfers_control_slow;
    11196        transfer_list_t transfers_interrupt;
    112         /** List and queue of low speed control transfers */
    113         transfer_list_t transfers_control_slow;
    114         /** List and queue of full speed bulk transfers */
    115         transfer_list_t transfers_bulk_full;
    116         /** List and queue of full speed control transfers */
    117         transfer_list_t transfers_control_full;
    11897
    119         /** Pointer table to the above lists, helps during scheduling */
    12098        transfer_list_t *transfers[2][4];
    12199
    122         /** Code to be executed in kernel interrupt handler */
    123100        irq_code_t interrupt_code;
    124101
    125         /** Commands that form interrupt code */
    126         irq_cmd_t interrupt_commands[UHCI_NEEDED_IRQ_COMMANDS];
     102        fid_t cleaner;
     103        fid_t debug_checker;
     104        bool hw_interrupts;
     105        unsigned hw_failures;
    127106
    128         /** Fibril periodically checking status register*/
    129         fid_t interrupt_emulator;
    130 
    131         /** Indicator of hw interrupts availability */
    132         bool hw_interrupts;
    133 
    134         /** Number of hw failures detected. */
    135         unsigned hw_failures;
     107        ddf_fun_t *ddf_instance;
    136108} hc_t;
    137109
Note: See TracChangeset for help on using the changeset viewer.