Changes in uspace/drv/bus/usb/uhci/uhci.c [8820544:5b89d43b] in mainline
- File:
-
- 1 edited
-
uspace/drv/bus/usb/uhci/uhci.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/uhci.c
r8820544 r5b89d43b 34 34 */ 35 35 36 /* XXX Fix this */ 37 #define _DDF_DATA_IMPLANT 38 36 39 #include <errno.h> 37 40 #include <stdbool.h> … … 59 62 hc_t hc; 60 63 /** Internal driver's representation of UHCI root hub */ 61 rh_t *rh;64 rh_t rh; 62 65 } uhci_t; 63 66 … … 69 72 /** IRQ handling callback, forward status from call to diver structure. 70 73 * 74 * @param[in] dev DDF instance of the device to use. 71 75 * @param[in] iid (Unused). 72 76 * @param[in] call Pointer to the call from kernel. 73 * @param[in] dev DDF instance of the device to use. 74 * 75 */ 76 static void irq_handler(ipc_callid_t iid, ipc_call_t *call, ddf_dev_t *dev) 77 */ 78 static void irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call) 77 79 { 78 80 assert(dev); 79 80 81 uhci_t *uhci = dev_to_uhci(dev); 81 82 if (!uhci) { … … 83 84 return; 84 85 } 85 86 86 const uint16_t status = IPC_GET_ARG1(*call); 87 87 hc_interrupt(&uhci->hc, status); … … 186 186 187 187 ddf_fun_set_ops(instance->hc_fun, &hc_ops); 188 ddf_fun_data_implant(instance->hc_fun, &instance->hc.generic); 188 189 189 190 instance->rh_fun = ddf_fun_create(device, fun_inner, "uhci_rh"); … … 195 196 196 197 ddf_fun_set_ops(instance->rh_fun, &rh_ops); 197 instance->rh = ddf_fun_data_alloc(instance->rh_fun, sizeof(rh_t));198 ddf_fun_data_implant(instance->rh_fun, &instance->rh); 198 199 199 200 addr_range_t regs; … … 235 236 } 236 237 237 rc = hc_init(&instance->hc, instance->hc_fun,®s, interrupts);238 rc = hc_init(&instance->hc, ®s, interrupts); 238 239 if (rc != EOK) { 239 240 usb_log_error("Failed to init uhci_hcd: %s.\n", str_error(rc)); … … 259 260 } 260 261 261 rc = rh_init( instance->rh, instance->rh_fun, ®s, 0x10, 4);262 rc = rh_init(&instance->rh, instance->rh_fun, ®s, 0x10, 4); 262 263 if (rc != EOK) { 263 264 usb_log_error("Failed to setup UHCI root hub: %s.\n",
Note:
See TracChangeset
for help on using the changeset viewer.
