diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-07 11:37:37 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-10-09 20:57:10 +0200 |
commit | efed4960013ed2636ed79b863e872a66f1ccd25d (patch) | |
tree | c3572c98acf9a3015d3b86d29acbbcb76ca25184 /include | |
parent | f59f5e86256f82daf4af3bf1922805592b780613 (diff) | |
download | barebox-efed4960013ed2636ed79b863e872a66f1ccd25d.tar.gz barebox-efed4960013ed2636ed79b863e872a66f1ccd25d.tar.xz |
of: Add function to get the model name
This is useful for printing it during startup.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h index 7b6a23ad71..ff01c937d0 100644 --- a/include/of.h +++ b/include/of.h @@ -108,12 +108,16 @@ void of_print_nodes(struct device_node *node, int indent); int of_probe(void); int of_parse_dtb(struct fdt_header *fdt); +int of_property_read_string(struct device_node *np, const char *propname, + const char **out_string); + #ifdef CONFIG_OFDEVICE int of_parse_partitions(const char *cdevname, struct device_node *node); struct device_node *of_get_root_node(void); int of_alias_get_id(struct device_node *np, const char *stem); +const char *of_get_model(void); #else static inline int of_parse_partitions(const char *cdevname, struct device_node *node) @@ -130,6 +134,11 @@ static inline int of_alias_get_id(struct device_node *np, const char *stem) { return -ENOENT; } + +static inline const char *of_get_model(void) +{ + return NULL; +} #endif #endif /* __OF_H */ |