diff options
Diffstat (limited to 'include/dm')
-rw-r--r-- | include/dm/ofnode.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h index ee8c44a71e..53f04ac91d 100644 --- a/include/dm/ofnode.h +++ b/include/dm/ofnode.h @@ -218,6 +218,18 @@ static inline ofnode ofnode_null(void) return node; } +static inline ofnode ofnode_root(void) +{ + ofnode node; + + if (of_live_active()) + node.np = gd_of_root(); + else + node.of_offset = 0; + + return node; +} + /** * ofnode_read_u32() - Read a 32-bit integer from a property * |