summaryrefslogtreecommitdiffstats
path: root/common/cmd_nvedit.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-02-24 17:33:21 +0000
committerSimon Glass <sjg@chromium.org>2013-02-28 19:09:23 -0800
commitbfc59966431e6335fd5be0589eec073902cc7bb3 (patch)
tree34674e10d633b07c11c5e715bc0779023346f5fd /common/cmd_nvedit.c
parent8c86bbe00f927de0655a65e43344ca0678d1bc34 (diff)
downloadblackbird-obmc-uboot-bfc59966431e6335fd5be0589eec073902cc7bb3.tar.gz
blackbird-obmc-uboot-bfc59966431e6335fd5be0589eec073902cc7bb3.zip
Update set_working_fdt_addr() to use setenv_addr()
We might as well use this common function instead of repeating the same code. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r--common/cmd_nvedit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 7633f0c44a..44e88aa401 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -295,17 +295,17 @@ int setenv_ulong(const char *varname, ulong value)
}
/**
- * Set an environment variable to an address in hex
+ * Set an environment variable to an value in hex
*
* @param varname Environmet variable to set
- * @param addr Value to set it to
+ * @param value Value to set it to
* @return 0 if ok, 1 on error
*/
-int setenv_addr(const char *varname, const void *addr)
+int setenv_hex(const char *varname, ulong value)
{
char str[17];
- sprintf(str, "%lx", (uintptr_t)addr);
+ sprintf(str, "%lx", value);
return setenv(varname, str);
}
OpenPOWER on IntegriCloud