Changes in uspace/lib/c/generic/ddi.c [848e880f:a69d42e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/ddi.c
r848e880f ra69d42e 220 220 /** Enable PIO for specified HW resource wrt. to the PIO window. 221 221 * 222 * @param win PIO window. May be NULL if the resources are known to be 223 * absolute. 224 * @param res Resources specifying the I/O range wrt. to the PIO window. 225 * @param[out] virt Virtual address for application's PIO operations. 226 * @param[out] phys If non-NULL, physical address of the resource 227 * @param[out] size If non-NULL, size of the enabled resource. 222 * @param win PIO window. May be NULL if the resources are known to be 223 * absolute. 224 * @param res Resources specifying the I/O range wrt. to the PIO window. 225 * @param virt Virtual address for application's PIO operations. 228 226 * 229 227 * @return EOK on success. … … 231 229 * 232 230 */ 233 errno_t pio_enable_resource(pio_window_t *win, hw_resource_t *res, void **virt, 234 uintptr_t *phys, size_t *size) 231 errno_t pio_enable_resource(pio_window_t *win, hw_resource_t *res, void **virt) 235 232 { 236 233 uintptr_t addr; 237 size_t s z;234 size_t size; 238 235 239 236 switch (res->type) { … … 245 242 addr += win->io.base; 246 243 } 247 s z= res->res.io_range.size;244 size = res->res.io_range.size; 248 245 break; 249 246 case MEM_RANGE: … … 254 251 addr += win->mem.base; 255 252 } 256 s z= res->res.mem_range.size;253 size = res->res.mem_range.size; 257 254 break; 258 255 default: … … 260 257 } 261 258 262 if (phys) 263 *phys = addr; 264 if (size) 265 *size = sz; 266 267 return pio_enable((void *) addr, sz, virt); 259 return pio_enable((void *) addr, size, virt); 268 260 } 269 261
Note:
See TracChangeset
for help on using the changeset viewer.