Rev 2927 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2927 | Rev 3674 | ||
---|---|---|---|
Line 119... | Line 119... | ||
119 | return; |
119 | return; |
120 | 120 | ||
121 | memcpy(current_node->da_name, &path[i], len); |
121 | memcpy(current_node->da_name, &path[i], len); |
122 | current_node->da_name[len] = '\0'; |
122 | current_node->da_name[len] = '\0'; |
123 | 123 | ||
124 | - | ||
125 | /* |
124 | /* |
126 | * Recursively process the potential child node. |
125 | * Recursively process the potential child node. |
127 | */ |
126 | */ |
128 | child = ofw_get_child_node(current); |
127 | child = ofw_get_child_node(current); |
129 | if (child != 0 && child != -1) { |
128 | if (child != 0 && child != -1) { |
Line 217... | Line 216... | ||
217 | * @return NULL on failure or pointer to the root node. |
216 | * @return NULL on failure or pointer to the root node. |
218 | */ |
217 | */ |
219 | ofw_tree_node_t *ofw_tree_build(void) |
218 | ofw_tree_node_t *ofw_tree_build(void) |
220 | { |
219 | { |
221 | ofw_tree_node_t *root; |
220 | ofw_tree_node_t *root; |
- | 221 | phandle ssm_node; |
|
- | 222 | ofw_tree_node_t *ssm; |
|
222 | 223 | ||
223 | root = ofw_tree_node_alloc(); |
224 | root = ofw_tree_node_alloc(); |
224 | if (root) |
225 | if (root) |
225 | ofw_tree_node_process(root, NULL, ofw_root); |
226 | ofw_tree_node_process(root, NULL, ofw_root); |
- | 227 | ||
- | 228 | /* |
|
- | 229 | * The firmware client interface does not automatically include the |
|
- | 230 | * "ssm" node in the list of children of "/". A nasty yet working |
|
- | 231 | * solution is to explicitly stick "ssm" to the OFW tree. |
|
- | 232 | */ |
|
- | 233 | ssm_node = ofw_find_device("/ssm@0,0"); |
|
- | 234 | if (ssm_node != -1) { |
|
- | 235 | ssm = ofw_tree_node_alloc(); |
|
- | 236 | if (ssm) { |
|
- | 237 | ofw_tree_node_process( |
|
- | 238 | ssm, root, ofw_find_device("/ssm@0,0")); |
|
- | 239 | ssm->peer = root->child; |
|
- | 240 | root->child = ssm; |
|
- | 241 | } |
|
- | 242 | } |
|
226 | 243 | ||
227 | return root; |
244 | return root; |
228 | } |
245 | } |