Changeset 33b1903 in mainline for kernel/genarch/src/ofw/ebus.c
- Timestamp:
- 2006-10-07T11:24:19Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8d4a577
- Parents:
- e2cc9a0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/ofw/ebus.c
re2cc9a0 r33b1903 37 37 38 38 #include <genarch/ofw/ofw_tree.h> 39 #include <arch/drivers/pci.h>40 39 #include <arch/memstr.h> 41 40 #include <arch/trap/interrupt.h> … … 78 77 } 79 78 80 bool ofw_ebus_map_interrupt s(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *inr)79 bool ofw_ebus_map_interrupt(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uint32_t interrupt, int *inr) 81 80 { 82 81 ofw_tree_property_t *prop; … … 115 114 /* 116 115 * We found the device that functions as an interrupt controller 117 * for the interrupt. We also found mapping from interrupt to INR. 118 * What needs to be done now is to verify that this indeed is a PCI 119 * node. 116 * for the interrupt. We also found partial mapping from interrupt to INO. 120 117 */ 121 118 … … 131 128 } 132 129 133 pci_t *pci = controller->device; 134 if (!pci) { 135 pci = pci_init(controller); 136 if (!pci) 137 return false; 138 controller->device = pci; 139 140 } 141 pci_enable_interrupt(pci, intr_map[i].controller_inr); 130 /* 131 * Let the PCI do the next step in mapping the interrupt. 132 */ 133 if (!ofw_pci_map_interrupt(controller, NULL, intr_map[i].controller_ino, inr)) 134 return false; 142 135 143 *inr = intr_map[i].controller_inr;144 *inr |= 0x1f << IGN_SHIFT; /* 0x1f is hardwired IGN */145 146 136 return true; 147 137 }
Note:
See TracChangeset
for help on using the changeset viewer.