Changeset 36db5ac in mainline
- Timestamp:
- 2006-09-30T10:56:10Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0b414b5
- Parents:
- 34bd143
- Location:
- kernel/genarch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/include/ofw/ofw_tree.h
r34bd143 r36db5ac 134 134 extern ofw_tree_node_t *ofw_tree_find_child_by_device_type(ofw_tree_node_t *node, const char *device_type); 135 135 extern ofw_tree_node_t *ofw_tree_find_peer_by_device_type(ofw_tree_node_t *node, const char *device_type); 136 extern ofw_tree_node_t *ofw_tree_find_node_by_handle(ofw_tree_node_t *root, uint32_t handle); 136 137 137 138 extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *node, ofw_fhc_reg_t *reg, uintptr_t *pa); -
kernel/genarch/src/ofw/ofw_tree.c
r34bd143 r36db5ac 148 148 } 149 149 150 /** Lookup node with matching node_handle. 151 * 152 * @param root Root of the searched subtree. 153 * @param handle OpenFirmware handle. 154 * 155 * @return NULL if there is no such node or pointer to the matching node. 156 */ 157 ofw_tree_node_t *ofw_tree_find_node_by_handle(ofw_tree_node_t *root, uint32_t handle) 158 { 159 ofw_tree_node_t *node; 160 161 if (root->node_handle == handle) 162 return root; 163 164 if (root->peer) { 165 node = ofw_tree_find_node_by_handle(root->peer, handle); 166 if (node) 167 return node; 168 } 169 170 if (root->child) { 171 node = ofw_tree_find_node_by_handle(root->child, handle); 172 if (node) 173 return node; 174 } 175 176 return NULL; 177 } 178 150 179 /** Lookup first peer of given device type. 151 180 *
Note:
See TracChangeset
for help on using the changeset viewer.