Changeset 5b89d43b in mainline for uspace/drv/bus/usb/uhci/uhci.c


Ignore:
Timestamp:
2013-12-14T11:54:29Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f5ceb18
Parents:
3558ba93
Message:

Unbreak USB UHCI support.

  • Support PIO_WINDOW_DEV_IFACE in the uhci driver.
  • Do not base the UHCI RH resources on the address obtained from pio_enable_range().
  • Provide a restricted PIO window instead, based on the UHCI IO range. The UHCI RH resources are then relative to this window.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/uhci.c

    r3558ba93 r5b89d43b  
    132132};
    133133
     134static 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
     143static pio_window_ops_t pio_window_iface = {
     144        .get_pio_window = get_pio_window
     145};
     146
    134147/** RH function support for uhci_rhd */
    135148static ddf_dev_ops_t rh_ops = {
    136149        .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
    138152};
    139153
     
    246260        }
    247261
    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);
    250263        if (rc != EOK) {
    251264                usb_log_error("Failed to setup UHCI root hub: %s.\n",
Note: See TracChangeset for help on using the changeset viewer.