Changeset 0a428943 in mainline
- Timestamp:
- 2013-09-11T17:35:48Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 26bc0fd1
- Parents:
- 6dbc500
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/isa.c
r6dbc500 r0a428943 67 67 68 68 #include <device/hw_res.h> 69 #include <device/pio_window.h> 69 70 70 71 #include "i8237.h" … … 79 80 ddf_dev_t *dev; 80 81 ddf_fun_t *fctl; 82 pio_window_t pio_win; 81 83 list_t functions; 82 84 } isa_bus_t; … … 405 407 hw_resource_t *resources = fun->hw_resources.resources; 406 408 409 isa_bus_t *isa = isa_bus(ddf_fun_get_dev(fun->fnode)); 410 407 411 if (count < ISA_MAX_HW_RES) { 408 412 resources[count].type = IO_RANGE; 409 413 resources[count].res.io_range.address = addr; 414 resources[count].res.io_range.address += isa->pio_win.io.base; 410 415 resources[count].res.io_range.size = len; 411 416 resources[count].res.io_range.endianness = LITTLE_ENDIAN; … … 604 609 static int isa_dev_add(ddf_dev_t *dev) 605 610 { 611 async_sess_t *sess; 612 int rc; 613 606 614 ddf_msg(LVL_DEBUG, "isa_dev_add, device handle = %d", 607 615 (int) ddf_dev_get_handle(dev)); … … 614 622 isa->dev = dev; 615 623 list_initialize(&isa->functions); 624 625 sess = ddf_dev_parent_sess_create(dev, EXCHANGE_SERIALIZE); 626 if (sess == NULL) { 627 ddf_msg(LVL_ERROR, "isa_dev_add failed to connect to the " 628 "parent driver."); 629 return ENOENT; 630 } 631 632 rc = pio_window_get(sess, &isa->pio_win); 633 if (rc != EOK) { 634 ddf_msg(LVL_ERROR, "isa_dev_add failed to get PIO window " 635 "for the device."); 636 return rc; 637 } 616 638 617 639 /* Make the bus device more visible. Does not do anything. */
Note:
See TracChangeset
for help on using the changeset viewer.