+STATIC\r
+BOOLEAN\r
+IsNodeEnabled (\r
+ INT32 Node\r
+ )\r
+{\r
+ CONST CHAR8 *NodeStatus;\r
+ INT32 Len;\r
+\r
+ //\r
+ // A missing status property implies 'ok' so ignore any errors that\r
+ // may occur here. If the status property is present, check whether\r
+ // it is set to 'ok' or 'okay', anything else is treated as 'disabled'.\r
+ //\r
+ NodeStatus = fdt_getprop (mDeviceTreeBase, Node, "status", &Len);\r
+ if (NodeStatus == NULL) {\r
+ return TRUE;\r
+ }\r
+ if (Len >= 5 && AsciiStrCmp (NodeStatus, "okay") == 0) {\r
+ return TRUE;\r
+ }\r
+ if (Len >= 3 && AsciiStrCmp (NodeStatus, "ok") == 0) {\r
+ return TRUE;\r
+ }\r
+ return FALSE;\r
+}\r
+\r