Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3478 → Rev 3479

/branches/sparc/boot/genarch/ofw_tree.c
219,28 → 219,27
ofw_tree_node_t *ofw_tree_build(void)
{
ofw_tree_node_t *root;
#if defined (SMART_FIRMWARE)
phandle ssm_node;
ofw_tree_node_t *ssm;
#endif
root = ofw_tree_node_alloc();
if (root)
ofw_tree_node_process(root, NULL, ofw_root);
 
#if defined (SMART_FIRMWARE)
/*
* The firmware client interface does not automatically include the
* "ssm" node in the list of children of "/". A nasty yet working
* solution is to explicitly stick "ssm" to the OFW tree.
*/
ssm = ofw_tree_node_alloc();
if (ssm) {
ofw_tree_node_process(ssm, root, ofw_find_device("/ssm@0,0"));
ssm->peer = root->child;
root->child = ssm;
ssm_node = ofw_find_device("/ssm@0,0");
if (ssm_node != -1) {
ssm = ofw_tree_node_alloc();
if (ssm) {
ofw_tree_node_process(ssm, root, ofw_find_device("/ssm@0,0"));
ssm->peer = root->child;
root->child = ssm;
}
}
#endif
return root;
}