Changes in uspace/drv/bus/isa/isa.c [b446b02:d51838f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/isa.c
rb446b02 rd51838f 453 453 } 454 454 455 static void isa_fun_add_mem_range(isa_fun_t *fun, uintptr_t addr, size_t len)456 {457 size_t count = fun->hw_resources.count;458 hw_resource_t *resources = fun->hw_resources.resources;459 460 isa_bus_t *isa = isa_bus(ddf_fun_get_dev(fun->fnode));461 462 if (count < ISA_MAX_HW_RES) {463 resources[count].type = MEM_RANGE;464 resources[count].res.mem_range.address = addr;465 resources[count].res.mem_range.address += isa->pio_win.mem.base;466 resources[count].res.mem_range.size = len;467 resources[count].res.mem_range.relative = true;468 resources[count].res.mem_range.endianness = LITTLE_ENDIAN;469 470 fun->hw_resources.count++;471 472 ddf_msg(LVL_NOTE, "Added mem range (addr=0x%zx, size=0x%x) to "473 "function %s", (uintptr_t) addr, (unsigned int) len,474 ddf_fun_get_name(fun->fnode));475 }476 }477 478 455 static void fun_parse_irq(isa_fun_t *fun, const char *val) 479 456 { … … 519 496 } 520 497 521 static void fun_parse_mem_range(isa_fun_t *fun, const char *val)522 {523 uintptr_t addr;524 size_t len;525 char *end = NULL;526 527 val = skip_spaces(val);528 addr = strtoul(val, &end, 0x10);529 530 if (val == end)531 return;532 533 val = skip_spaces(end);534 len = strtol(val, &end, 0x10);535 536 if (val == end)537 return;538 539 isa_fun_add_mem_range(fun, addr, len);540 }541 542 498 static void get_match_id(char **id, const char *val) 543 499 { … … 608 564 609 565 if (!prop_parse(fun, line, "io_range", &fun_parse_io_range) && 610 !prop_parse(fun, line, "mem_range", &fun_parse_mem_range) &&611 566 !prop_parse(fun, line, "irq", &fun_parse_irq) && 612 567 !prop_parse(fun, line, "dma", &fun_parse_dma) &&
Note:
See TracChangeset
for help on using the changeset viewer.