Changes in uspace/drv/bus/usb/uhci/hc.h [9d58539:b5111c46] in mainline
- File:
-
- 1 edited
-
uspace/drv/bus/usb/uhci/hc.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/hc.h
r9d58539 rb5111c46 36 36 #define DRV_UHCI_HC_H 37 37 38 #include <ddf/driver.h> 39 #include <ddf/interrupt.h> 40 #include <device/hw_res_parsed.h> 38 41 #include <fibril.h> 39 #include <ddi.h>40 41 42 #include <usb/host/hcd.h> 42 43 … … 46 47 typedef struct uhci_regs { 47 48 /** Command register, controls HC behaviour */ 48 uint16_t usbcmd;49 ioport16_t usbcmd; 49 50 #define UHCI_CMD_MAX_PACKET (1 << 7) 50 51 #define UHCI_CMD_CONFIGURE (1 << 6) … … 57 58 58 59 /** Status register, 1 means interrupt is asserted (if enabled) */ 59 uint16_t usbsts;60 ioport16_t usbsts; 60 61 #define UHCI_STATUS_HALTED (1 << 5) 61 62 #define UHCI_STATUS_PROCESS_ERROR (1 << 4) … … 68 69 69 70 /** Interrupt enabled registers */ 70 uint16_t usbintr;71 ioport16_t usbintr; 71 72 #define UHCI_INTR_SHORT_PACKET (1 << 3) 72 73 #define UHCI_INTR_COMPLETE (1 << 2) … … 75 76 76 77 /** Register stores frame number used in SOF packet */ 77 uint16_t frnum;78 ioport16_t frnum; 78 79 79 80 /** Pointer(physical) to the Frame List */ 80 uint32_t flbaseadd;81 ioport32_t flbaseadd; 81 82 82 83 /** SOF modification to match external timers */ 83 uint8_t sofmod;84 ioport8_t sofmod; 84 85 } uhci_regs_t; 85 86 … … 93 94 typedef struct hc { 94 95 /** Generic HCD driver structure */ 95 hcd_t generic;96 hcd_t *generic; 96 97 97 98 /** Addresses of I/O registers */ … … 121 122 } hc_t; 122 123 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);124 int hc_register_irq_handler(ddf_dev_t *, addr_range_t *, int, 125 interrupt_handler_t); 126 int hc_get_irq_code(irq_pio_range_t [], size_t, irq_cmd_t [], size_t, 127 addr_range_t *); 127 128 void hc_interrupt(hc_t *instance, uint16_t status); 128 int hc_init(hc_t * instance, void *regs, size_t reg_size, bool interupts);129 int hc_init(hc_t *, ddf_fun_t *, addr_range_t *, bool); 129 130 130 131 /** Safely dispose host controller internal structures … … 134 135 static inline void hc_fini(hc_t *instance) {} /* TODO: implement*/ 135 136 #endif 137 136 138 /** 137 139 * @}
Note:
See TracChangeset
for help on using the changeset viewer.
