diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-06-07 22:16:48 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-07-06 10:09:29 +0200 |
commit | 699b4f80254de45a6ff45dff0a863e457dea7d89 (patch) | |
tree | 13e6a7184f2b9c56d19eb18636e588d59c98d603 /lib | |
parent | b17973f8ba8e246628ac62fca9873bf8226a61cf (diff) | |
download | barebox-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 'lib')
-rw-r--r-- | lib/parameter.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/parameter.c b/lib/parameter.c index 3d356fb972..656a6037c6 100644 --- a/lib/parameter.c +++ b/lib/parameter.c @@ -28,6 +28,7 @@ #include <malloc.h> #include <driver.h> #include <string.h> +#include <globalvar.h> #include <linux/err.h> struct param_d *get_param_by_name(struct device_d *dev, const char *name) @@ -156,6 +157,8 @@ static int __dev_add_param(struct param_d *param, struct device_d *dev, const ch param->dev = dev; list_add_sort(¶m->list, &dev->parameters, compare); + dev_param_init_from_nv(dev, name); + return 0; } |