Changeset 33b1903 in mainline for kernel/genarch/src/ofw/pci.c
- Timestamp:
- 2006-10-07T11:24:19Z (18 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/pci.c
re2cc9a0 r33b1903 37 37 38 38 #include <genarch/ofw/ofw_tree.h> 39 #include <arch/drivers/pci.h> 40 #include <arch/trap/interrupt.h> 39 41 #include <arch/memstr.h> 40 42 #include <func.h> … … 45 47 #define PCI_ABS_MASK 0x80000000 46 48 #define PCI_REG_MASK 0x000000ff 49 50 #define PCI_IGN 0x1f 47 51 48 52 bool ofw_pci_apply_ranges(ofw_tree_node_t *node, ofw_pci_reg_t *reg, uintptr_t *pa) … … 111 115 } 112 116 117 /** Map PCI interrupt. 118 * 119 * So far, we only know how to map interrupts of non-PCI devices connected 120 * to a PCI bridge. 121 */ 122 bool ofw_pci_map_interrupt(ofw_tree_node_t *node, ofw_pci_reg_t *reg, int ino, int *inr) 123 { 124 pci_t *pci = node->device; 125 if (!pci) { 126 pci = pci_init(node); 127 if (!pci) 128 return false; 129 node->device = pci; 130 } 131 132 pci_enable_interrupt(pci, ino); 133 134 *inr = (PCI_IGN << IGN_SHIFT) | ino; 135 136 return true; 137 } 138 113 139 /** @} 114 140 */
Note:
See TracChangeset
for help on using the changeset viewer.