Changeset 5b89d43b in mainline for uspace/drv/bus/usb/uhci/root_hub.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/root_hub.c

    r3558ba93 r5b89d43b  
    3636#include <str_error.h>
    3737#include <stdio.h>
     38#include <device/hw_res_parsed.h>
    3839
    3940#include <usb/debug.h>
     
    4849 * @return Error code.
    4950 */
    50 int rh_init(rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size)
     51int
     52rh_init(rh_t *instance, ddf_fun_t *fun, addr_range_t *regs, uintptr_t reg_addr,
     53    size_t reg_size)
    5154{
    5255        assert(instance);
    5356        assert(fun);
     57
     58        /* Crop the PIO window to the absolute address range of UHCI I/O. */
     59        instance->pio_window.mem.base = 0;
     60        instance->pio_window.mem.size = 0;
     61        instance->pio_window.io.base = RNGABS(*regs);
     62        instance->pio_window.io.size = RNGSZ(*regs);
    5463
    5564        /* Initialize resource structure */
     
    6069        instance->io_regs.res.io_range.address = reg_addr;
    6170        instance->io_regs.res.io_range.size = reg_size;
     71        instance->io_regs.res.io_range.relative = true;
    6272        instance->io_regs.res.io_range.endianness = LITTLE_ENDIAN;
    6373
Note: See TracChangeset for help on using the changeset viewer.