Ignore:
File:
1 edited

Legend:

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

    r1ae74c6 rd52ab7b  
    3636#define DRV_UHCI_HC_H
    3737
     38#include <ddf/interrupt.h>
     39#include <device/hw_res_parsed.h>
    3840#include <fibril.h>
    3941#include <usb/host/hcd.h>
     
    4446typedef struct uhci_regs {
    4547        /** Command register, controls HC behaviour */
    46         uint16_t usbcmd;
     48        ioport16_t usbcmd;
    4749#define UHCI_CMD_MAX_PACKET (1 << 7)
    4850#define UHCI_CMD_CONFIGURE  (1 << 6)
     
    5557
    5658        /** Status register, 1 means interrupt is asserted (if enabled) */
    57         uint16_t usbsts;
     59        ioport16_t usbsts;
    5860#define UHCI_STATUS_HALTED (1 << 5)
    5961#define UHCI_STATUS_PROCESS_ERROR (1 << 4)
     
    6668
    6769        /** Interrupt enabled registers */
    68         uint16_t usbintr;
     70        ioport16_t usbintr;
    6971#define UHCI_INTR_SHORT_PACKET (1 << 3)
    7072#define UHCI_INTR_COMPLETE (1 << 2)
     
    7375
    7476        /** Register stores frame number used in SOF packet */
    75         uint16_t frnum;
     77        ioport16_t frnum;
    7678
    7779        /** Pointer(physical) to the Frame List */
    78         uint32_t flbaseadd;
     80        ioport32_t flbaseadd;
    7981
    8082        /** SOF modification to match external timers */
    81         uint8_t sofmod;
     83        ioport8_t sofmod;
    8284} uhci_regs_t;
    8385
     
    119121} hc_t;
    120122
    121 size_t hc_irq_pio_range_count(void);
    122 size_t hc_irq_cmd_count(void);
    123 int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t, uintptr_t,
    124     size_t);
     123int hc_register_irq_handler(ddf_dev_t *, addr_range_t *, int,
     124    interrupt_handler_t);
     125int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t,
     126    addr_range_t *);
    125127void hc_interrupt(hc_t *instance, uint16_t status);
    126 int hc_init(hc_t *instance, void *regs, size_t reg_size, bool interupts);
     128int hc_init(hc_t *instance, addr_range_t *regs, bool interupts);
    127129
    128130/** Safely dispose host controller internal structures
     
    132134static inline void hc_fini(hc_t *instance) {} /* TODO: implement*/
    133135#endif
     136
    134137/**
    135138 * @}
Note: See TracChangeset for help on using the changeset viewer.