Changes in uspace/drv/bus/usb/uhci/uhci.c [795448f:76fbd9a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/uhci.c
r795448f r76fbd9a 41 41 42 42 #include "uhci.h" 43 44 #include "res.h" 43 #include "pci.h" 44 45 45 #include "hc.h" 46 46 #include "root_hub.h" … … 49 49 * and USB root hub */ 50 50 typedef struct uhci { 51 /** Pointer to DDF represen tation of UHCI host controller */51 /** Pointer to DDF represenation of UHCI host controller */ 52 52 ddf_fun_t *hc_fun; 53 /** Pointer to DDF represen tation of UHCI root hub */53 /** Pointer to DDF represenation of UHCI root hub */ 54 54 ddf_fun_t *rh_fun; 55 55 56 /** Internal driver's represen tation of UHCI host controller */56 /** Internal driver's represenation of UHCI host controller */ 57 57 hc_t hc; 58 /** Internal driver's represen tation of UHCI root hub */58 /** Internal driver's represenation of UHCI root hub */ 59 59 rh_t rh; 60 60 } uhci_t; … … 65 65 return dev->driver_data; 66 66 } 67 /*----------------------------------------------------------------------------*/ 67 68 68 /** IRQ handling callback, forward status from call to diver structure. 69 69 * … … 83 83 hc_interrupt(&uhci->hc, status); 84 84 } 85 /*----------------------------------------------------------------------------*/ 85 86 86 /** Operations supported by the HC driver */ 87 87 static ddf_dev_ops_t hc_ops = { 88 88 .interfaces[USBHC_DEV_IFACE] = &hcd_iface, /* see iface.h/c */ 89 89 }; 90 /*----------------------------------------------------------------------------*/ 90 91 91 /** Gets handle of the respective hc. 92 92 * … … 105 105 return EOK; 106 106 } 107 /*----------------------------------------------------------------------------*/ 107 108 108 /** USB interface implementation used by RH */ 109 109 static usb_iface_t usb_iface = { 110 110 .get_hc_handle = usb_iface_get_hc_handle, 111 111 }; 112 /*----------------------------------------------------------------------------*/ 112 113 113 /** Get root hub hw resources (I/O registers). 114 114 * … … 123 123 return &rh->resource_list; 124 124 } 125 /*----------------------------------------------------------------------------*/ 125 126 126 /** Interface to provide the root hub driver with hw info */ 127 127 static hw_res_ops_t hw_res_iface = { … … 129 129 .enable_interrupt = NULL, 130 130 }; 131 /*----------------------------------------------------------------------------*/ 131 132 132 /** RH function support for uhci_rhd */ 133 133 static ddf_dev_ops_t rh_ops = { … … 135 135 .interfaces[HW_RES_DEV_IFACE] = &hw_res_iface 136 136 }; 137 /*----------------------------------------------------------------------------*/ 137 138 138 /** Initialize hc and rh DDF structures and their respective drivers. 139 139 * … … 187 187 int irq = 0; 188 188 189 ret = get_my_registers(device, ®_base, ®_size, &irq);189 ret = pci_get_my_registers(device, ®_base, ®_size, &irq); 190 190 CHECK_RET_DEST_FREE_RETURN(ret, 191 191 "Failed to get I/O addresses for %" PRIun ": %s.\n", … … 194 194 (void *) reg_base, reg_size, irq); 195 195 196 ret = disable_legacy(device);196 ret = pci_disable_legacy(device); 197 197 CHECK_RET_DEST_FREE_RETURN(ret, 198 198 "Failed to disable legacy USB: %s.\n", str_error(ret)); … … 220 220 221 221 bool interrupts = false; 222 ret = enable_interrupts(device);222 ret = pci_enable_interrupts(device); 223 223 if (ret != EOK) { 224 224 usb_log_warning("Failed to enable interrupts: %s."
Note:
See TracChangeset
for help on using the changeset viewer.