diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-04-18 12:41:00 +0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-06-19 19:18:48 +0400 |
commit | bc6ed0f9dc56fe1738646e6882a0b87e6766eaaa (patch) | |
tree | 4e38cd29b6be113850fa5432bbf544beb00a1d36 /common/fdt_support.c | |
parent | dbe963ae516356395182325a032a55356d46d275 (diff) | |
download | u-boot-bc6ed0f9dc56fe1738646e6882a0b87e6766eaaa.tar.xz |
fdt_support: delete force argument of fdt_chosen()
After all, we have realized "force" argument is completely
useless. fdt_chosen() was always called with force = 1.
We should always want to do the same thing
(set appropriate value to the property)
even if the property already exists.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/fdt_support.c')
-rw-r--r-- | common/fdt_support.c | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c index 321dd2a655..f5a5cdfe3d 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -262,12 +262,11 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end) return 0; } -int fdt_chosen(void *fdt, int force) +int fdt_chosen(void *fdt) { int nodeoffset; int err; char *str; /* used to set string properties */ - const char *path; err = fdt_check_header(fdt); if (err < 0) { @@ -280,38 +279,25 @@ int fdt_chosen(void *fdt, int force) if (nodeoffset < 0) return nodeoffset; - /* - * Create /chosen properites that don't exist in the fdt. - * If the property exists, update it only if the "force" parameter - * is true. - */ str = getenv("bootargs"); if (str != NULL) { - path = fdt_getprop(fdt, nodeoffset, "bootargs", NULL); - if ((path == NULL) || force) { - err = fdt_setprop(fdt, nodeoffset, - "bootargs", str, strlen(str)+1); - if (err < 0) - printf("WARNING: could not set bootargs %s.\n", - fdt_strerror(err)); - } + err = fdt_setprop(fdt, nodeoffset, + "bootargs", str, strlen(str)+1); + if (err < 0) + printf("WARNING: could not set bootargs %s.\n", + fdt_strerror(err)); } #ifdef CONFIG_OF_STDOUT_VIA_ALIAS - path = fdt_getprop(fdt, nodeoffset, "linux,stdout-path", NULL); - if ((path == NULL) || force) - err = fdt_fixup_stdout(fdt, nodeoffset); + err = fdt_fixup_stdout(fdt, nodeoffset); #endif #ifdef OF_STDOUT_PATH - path = fdt_getprop(fdt, nodeoffset, "linux,stdout-path", NULL); - if ((path == NULL) || force) { - err = fdt_setprop(fdt, nodeoffset, - "linux,stdout-path", OF_STDOUT_PATH, strlen(OF_STDOUT_PATH)+1); - if (err < 0) - printf("WARNING: could not set linux,stdout-path %s.\n", - fdt_strerror(err)); - } + err = fdt_setprop(fdt, nodeoffset, "linux,stdout-path", + OF_STDOUT_PATH, strlen(OF_STDOUT_PATH)+1); + if (err < 0) + printf("WARNING: could not set linux,stdout-path %s.\n", + fdt_strerror(err)); #endif return err; |