Subversion Repositories HelenOS

Rev

Rev 3467 | Rev 3582 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3467 Rev 3479
Line 217... Line 217...
217
 * @return NULL on failure or pointer to the root node.
217
 * @return NULL on failure or pointer to the root node.
218
 */
218
 */
219
ofw_tree_node_t *ofw_tree_build(void)
219
ofw_tree_node_t *ofw_tree_build(void)
220
{
220
{
221
    ofw_tree_node_t *root;
221
    ofw_tree_node_t *root;
222
   
-
 
223
#if defined (SMART_FIRMWARE)
222
    phandle ssm_node;
224
    ofw_tree_node_t *ssm;
223
    ofw_tree_node_t *ssm;
225
#endif
-
 
226
   
224
   
227
    root = ofw_tree_node_alloc();
225
    root = ofw_tree_node_alloc();
228
    if (root)
226
    if (root)
229
        ofw_tree_node_process(root, NULL, ofw_root);
227
        ofw_tree_node_process(root, NULL, ofw_root);
230
 
228
 
231
#if defined (SMART_FIRMWARE)
-
 
232
    /*
229
    /*
233
     * The firmware client interface does not automatically include the
230
     * The firmware client interface does not automatically include the
234
     * "ssm" node in the list of children of "/". A nasty yet working
231
     * "ssm" node in the list of children of "/". A nasty yet working
235
     * solution is to explicitly stick "ssm" to the OFW tree.
232
     * solution is to explicitly stick "ssm" to the OFW tree.
236
     */
233
     */
-
 
234
    ssm_node = ofw_find_device("/ssm@0,0");
-
 
235
    if (ssm_node != -1) {
237
    ssm = ofw_tree_node_alloc();
236
        ssm = ofw_tree_node_alloc();
238
    if (ssm) {
237
        if (ssm) {
239
        ofw_tree_node_process(ssm, root, ofw_find_device("/ssm@0,0"));
238
            ofw_tree_node_process(ssm, root, ofw_find_device("/ssm@0,0"));
240
        ssm->peer = root->child;
239
            ssm->peer = root->child;
241
        root->child = ssm;
240
            root->child = ssm;
-
 
241
        }
242
    }
242
    }
243
#endif
-
 
244
   
243
   
245
    return root;
244
    return root;
246
}
245
}