Changeset 8d2760f in mainline for kernel/genarch/src/ofw/ebus.c
- Timestamp:
- 2008-11-29T20:24:47Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 57e76cb
- Parents:
- dfd77382
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/ofw/ebus.c
rdfd77382 r8d2760f 45 45 46 46 /** Apply EBUS ranges to EBUS register. */ 47 bool ofw_ebus_apply_ranges(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uintptr_t *pa) 47 bool 48 ofw_ebus_apply_ranges(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uintptr_t *pa) 48 49 { 49 50 ofw_tree_property_t *prop; … … 63 64 if (reg->space != range[i].child_space) 64 65 continue; 65 if (overlaps(reg->addr, reg->size, range[i].child_base, range[i].size)) { 66 if (overlaps(reg->addr, reg->size, range[i].child_base, 67 range[i].size)) { 66 68 ofw_pci_reg_t pci_reg; 67 69 68 70 pci_reg.space = range[i].parent_space; 69 pci_reg.addr = range[i].parent_base + (reg->addr - range[i].child_base); 71 pci_reg.addr = range[i].parent_base + 72 (reg->addr - range[i].child_base); 70 73 pci_reg.size = reg->size; 71 74 … … 77 80 } 78 81 79 bool ofw_ebus_map_interrupt(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *inr) 82 bool 83 ofw_ebus_map_interrupt(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, 84 uint32_t interrupt, int *inr, cir_t *cir, void **cir_arg) 80 85 { 81 86 ofw_tree_property_t *prop; … … 105 110 unsigned int i; 106 111 for (i = 0; i < count; i++) { 107 if ((intr_map[i].space == space) && (intr_map[i].addr == addr)108 112 if ((intr_map[i].space == space) && 113 (intr_map[i].addr == addr) && (intr_map[i].intr == intr)) 109 114 goto found; 110 115 } … … 114 119 /* 115 120 * We found the device that functions as an interrupt controller 116 * for the interrupt. We also found partial mapping from interrupt to INO. 121 * for the interrupt. We also found partial mapping from interrupt to 122 * INO. 117 123 */ 118 124 119 controller = ofw_tree_find_node_by_handle(ofw_tree_lookup("/"), intr_map[i].controller_handle); 125 controller = ofw_tree_find_node_by_handle(ofw_tree_lookup("/"), 126 intr_map[i].controller_handle); 120 127 if (!controller) 121 128 return false; … … 131 138 * Let the PCI do the next step in mapping the interrupt. 132 139 */ 133 if (!ofw_pci_map_interrupt(controller, NULL, intr_map[i].controller_ino, inr)) 140 if (!ofw_pci_map_interrupt(controller, NULL, intr_map[i].controller_ino, 141 inr, cir, cir_arg)) 134 142 return false; 135 143
Note:
See TracChangeset
for help on using the changeset viewer.