Changes in uspace/drv/bus/usb/ehci/res.c [d930980:7de1988c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/res.c
rd930980 r7de1988c 71 71 * 72 72 * @param[in] dev Device asking for the addresses. 73 * @param[out] mem_reg_address Base address of the memory range. 74 * @param[out] mem_reg_size Size of the memory range. 73 * @param[out] mem_regs_p Pointer to the register range. 75 74 * @param[out] irq_no IRQ assigned to the device. 76 75 * @return Error code. 77 76 */ 78 77 int get_my_registers(ddf_dev_t *dev, 79 uintptr_t *mem_reg_address, size_t *mem_reg_size, int *irq_no)78 addr_range_t *mem_regs_p, int *irq_no) 80 79 { 81 80 assert(dev); … … 99 98 } 100 99 101 if (mem_reg_address) 102 *mem_reg_address = hw_res.mem_ranges.ranges[0].address; 103 if (mem_reg_size) 104 *mem_reg_size = hw_res.mem_ranges.ranges[0].size; 100 if (mem_regs_p) 101 *mem_regs_p = hw_res.mem_ranges.ranges[0]; 105 102 if (irq_no) 106 103 *irq_no = hw_res.irqs.irqs[0]; … … 267 264 } 268 265 269 int disable_legacy(ddf_dev_t *device, uintptr_t reg_base, size_t reg_size)266 int disable_legacy(ddf_dev_t *device, addr_range_t *reg_range) 270 267 { 271 268 assert(device); … … 274 271 /* Map EHCI registers */ 275 272 void *regs = NULL; 276 int rc = pio_enable ((void*)reg_base, reg_size, ®s);273 int rc = pio_enable_range(reg_range, ®s); 277 274 if (rc != EOK) { 278 275 usb_log_error("Failed to map registers %p: %s.\n", 279 (void *) reg_base, str_error(rc));276 RNGABSPTR(*reg_range), str_error(rc)); 280 277 return rc; 281 278 }
Note:
See TracChangeset
for help on using the changeset viewer.