Ignore:
File:
1 edited

Legend:

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

    r9d58539 rb5111c46  
    3636#define DRV_UHCI_HC_H
    3737
     38#include <ddf/driver.h>
     39#include <ddf/interrupt.h>
     40#include <device/hw_res_parsed.h>
    3841#include <fibril.h>
    39 #include <ddi.h>
    40 
    4142#include <usb/host/hcd.h>
    4243
     
    4647typedef struct uhci_regs {
    4748        /** Command register, controls HC behaviour */
    48         uint16_t usbcmd;
     49        ioport16_t usbcmd;
    4950#define UHCI_CMD_MAX_PACKET (1 << 7)
    5051#define UHCI_CMD_CONFIGURE  (1 << 6)
     
    5758
    5859        /** Status register, 1 means interrupt is asserted (if enabled) */
    59         uint16_t usbsts;
     60        ioport16_t usbsts;
    6061#define UHCI_STATUS_HALTED (1 << 5)
    6162#define UHCI_STATUS_PROCESS_ERROR (1 << 4)
     
    6869
    6970        /** Interrupt enabled registers */
    70         uint16_t usbintr;
     71        ioport16_t usbintr;
    7172#define UHCI_INTR_SHORT_PACKET (1 << 3)
    7273#define UHCI_INTR_COMPLETE (1 << 2)
     
    7576
    7677        /** Register stores frame number used in SOF packet */
    77         uint16_t frnum;
     78        ioport16_t frnum;
    7879
    7980        /** Pointer(physical) to the Frame List */
    80         uint32_t flbaseadd;
     81        ioport32_t flbaseadd;
    8182
    8283        /** SOF modification to match external timers */
    83         uint8_t sofmod;
     84        ioport8_t sofmod;
    8485} uhci_regs_t;
    8586
     
    9394typedef struct hc {
    9495        /** Generic HCD driver structure */
    95         hcd_t generic;
     96        hcd_t *generic;
    9697
    9798        /** Addresses of I/O registers */
     
    121122} hc_t;
    122123
    123 size_t hc_irq_pio_range_count(void);
    124 size_t hc_irq_cmd_count(void);
    125 int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t, uintptr_t,
    126     size_t);
     124int hc_register_irq_handler(ddf_dev_t *, addr_range_t *, int,
     125    interrupt_handler_t);
     126int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t,
     127    addr_range_t *);
    127128void hc_interrupt(hc_t *instance, uint16_t status);
    128 int hc_init(hc_t *instance, void *regs, size_t reg_size, bool interupts);
     129int hc_init(hc_t *, ddf_fun_t *, addr_range_t *, bool);
    129130
    130131/** Safely dispose host controller internal structures
     
    134135static inline void hc_fini(hc_t *instance) {} /* TODO: implement*/
    135136#endif
     137
    136138/**
    137139 * @}
Note: See TracChangeset for help on using the changeset viewer.