summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-06-07 22:16:48 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-07-06 10:09:29 +0200
commit699b4f80254de45a6ff45dff0a863e457dea7d89 (patch)
tree13e6a7184f2b9c56d19eb18636e588d59c98d603 /include
parentb17973f8ba8e246628ac62fca9873bf8226a61cf (diff)
downloadbarebox-699b4f80254de45a6ff45dff0a863e457dea7d89.tar.gz
barebox-699b4f80254de45a6ff45dff0a863e457dea7d89.tar.xz
Introduce non volatile device variables
Non volatile device variables are used to make device parameters persistent. They are like normal non volatile variables, but set the values of the device parameters with the corresponding name. Every nv variable beginning with nv.dev is a non volatile device variable. They have the form nv.dev.<devname>.<paramname> and act on the parameter <paramname> of the device named <devname>. The non volatile device variables are designated for example for video modes, ethernet device ip addresses or mtd partitioning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/globalvar.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/globalvar.h b/include/globalvar.h
index 5dfa371409..67b97de486 100644
--- a/include/globalvar.h
+++ b/include/globalvar.h
@@ -94,6 +94,8 @@ int nvvar_add(const char *name, const char *value);
int nvvar_remove(const char *name);
void globalvar_print(void);
+void dev_param_init_from_nv(struct device_d *dev, const char *name);
+
#else
static inline int globalvar_add_simple(const char *name, const char *value)
{
@@ -165,6 +167,10 @@ static inline int nvvar_remove(const char *name)
return 0;
}
+static inline void dev_param_init_from_nv(struct device_d *dev, const char *name)
+{
+}
+
#endif
#endif /* __GLOBALVAR_H */