Changeset 99c2c69e in mainline for uspace/drv/bus/usb/uhcirh/root_hub.c
- Timestamp:
- 2013-09-13T00:36:30Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67fbd5e
- Parents:
- 7f84430 (diff), 11d41be5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhcirh/root_hub.c
r7f84430 r99c2c69e 36 36 #include <ddi.h> 37 37 #include <usb/debug.h> 38 #include <device/hw_res_parsed.h> 38 39 39 40 #include "root_hub.h" … … 42 43 * 43 44 * @param[in] instance Driver memory structure to use. 44 * @param[in] addr Address of I/O registers. 45 * @param[in] size Size of available I/O space. 45 * @param[in] io_regs Range of I/O registers. 46 46 * @param[in] rh Pointer to DDF instance of the root hub driver. 47 47 * @return Error code. 48 48 */ 49 int uhci_root_hub_init( 50 uhci_root_hub_t *instance, void *addr, size_t size,ddf_dev_t *rh)49 int uhci_root_hub_init(uhci_root_hub_t *instance, addr_range_t *io_regs, 50 ddf_dev_t *rh) 51 51 { 52 port_status_t *regs; 53 52 54 assert(instance); 53 55 assert(rh); 54 56 55 57 /* Allow access to root hub port registers */ 56 assert(sizeof( port_status_t) * UHCI_ROOT_HUB_PORT_COUNT <=size);57 port_status_t *regs; 58 int ret = pio_enable (addr, size, (void**)®s);58 assert(sizeof(*regs) * UHCI_ROOT_HUB_PORT_COUNT <= io_regs->size); 59 60 int ret = pio_enable_range(io_regs, (void **) ®s); 59 61 if (ret < 0) { 60 62 usb_log_error( 61 63 "Failed(%d) to gain access to port registers at %p: %s.\n", 62 ret, regs, str_error(ret));64 ret, RNGABSPTR(*io_regs), str_error(ret)); 63 65 return ret; 64 66 }
Note:
See TracChangeset
for help on using the changeset viewer.