summaryrefslogtreecommitdiffstats
path: root/include/of.h
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-04-22 10:20:12 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-04-23 08:12:28 +0200
commit885a1cf27e6ae7a39113dd6c707d400c1585b35c (patch)
tree0042057d9f4946784d00c3f48aa71a3ed5a6fac3 /include/of.h
parent0238fb4c0da005421ed11b3e178558a140029972 (diff)
downloadbarebox-885a1cf27e6ae7a39113dd6c707d400c1585b35c.tar.gz
barebox-885a1cf27e6ae7a39113dd6c707d400c1585b35c.tar.xz
of_path: of_find_path(): add possibility to return .bb device
This patch adds a flags argument to the of_find_path() function. The only flag defined for now is OF_FIND_PATH_FLAGS_BB. When used on NAND devices, the function returns the bad block aware device (the ".bb" device). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/of.h')
-rw-r--r--include/of.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/of.h b/include/of.h
index 7235138f30..2dcb613a77 100644
--- a/include/of.h
+++ b/include/of.h
@@ -240,7 +240,8 @@ int of_add_memory(struct device_node *node, bool dump);
void of_add_memory_bank(struct device_node *node, bool dump, int r,
u64 base, u64 size);
struct device_d *of_find_device_by_node_path(const char *path);
-int of_find_path(struct device_node *node, const char *propname, char **outpath);
+#define OF_FIND_PATH_FLAGS_BB 1 /* return .bb device if available */
+int of_find_path(struct device_node *node, const char *propname, char **outpath, unsigned flags);
int of_register_fixup(int (*fixup)(struct device_node *, void *), void *context);
struct device_node *of_find_node_by_alias(struct device_node *root,
const char *alias);