~sheosi/helenos/lua

« back to all changes in this revision

Viewing changes to uspace/drv/bus/usb/uhci/uhci.c

  • Committer: Sergio Tortosa (sheosi)
  • Date: 2013-12-22 14:13:23 UTC
  • mfrom: (2032.1.12 mainline)
  • Revision ID: sertorbe@gmail.com-20131222141323-gbiqm4j2w9sbjty5
MergedĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
        .enable_interrupt = NULL,
132
132
};
133
133
 
 
134
static pio_window_t *get_pio_window(ddf_fun_t *fun)
 
135
{
 
136
        rh_t *rh = ddf_fun_data_get(fun);
 
137
        
 
138
        if (rh == NULL)
 
139
                return NULL;
 
140
        return &rh->pio_window;
 
141
}
 
142
 
 
143
static pio_window_ops_t pio_window_iface = {
 
144
        .get_pio_window = get_pio_window
 
145
};
 
146
 
134
147
/** RH function support for uhci_rhd */
135
148
static ddf_dev_ops_t rh_ops = {
136
149
        .interfaces[USB_DEV_IFACE] = &usb_iface,
137
 
        .interfaces[HW_RES_DEV_IFACE] = &hw_res_iface
 
150
        .interfaces[HW_RES_DEV_IFACE] = &hw_res_iface,
 
151
        .interfaces[PIO_WINDOW_DEV_IFACE] = &pio_window_iface
138
152
};
139
153
 
140
154
/** Initialize hc and rh DDF structures and their respective drivers.
245
259
                goto error;
246
260
        }
247
261
 
248
 
        rc = rh_init(&instance->rh, instance->rh_fun,
249
 
            (uintptr_t)instance->hc.registers + 0x10, 4);
 
262
        rc = rh_init(&instance->rh, instance->rh_fun, &regs, 0x10, 4);
250
263
        if (rc != EOK) {
251
264
                usb_log_error("Failed to setup UHCI root hub: %s.\n",
252
265
                    str_error(rc));