[U-Boot] [PATCH] ARM: uniphier: do not overwrite fdt_file environment

Masahiro Yamada yamada.masahiro at socionext.com
Tue May 31 14:57:40 CEST 2016


This code auto-detects the best-match FDT file name, but it should
respect the user's choice if "fdt_file" environment is found in
a non-volatile device.

Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
---

 arch/arm/mach-uniphier/board_late_init.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c
index 845f047..eabf2b5 100644
--- a/arch/arm/mach-uniphier/board_late_init.c
+++ b/arch/arm/mach-uniphier/board_late_init.c
@@ -39,6 +39,9 @@ static int uniphier_set_fdt_file(void)
 	int buf_len = 256;
 	int ret;
 
+	if (getenv("fdt_file"))
+		return 0;	/* do nothing if it is already set */
+
 	ret = fdt_get_string(gd->fdt_blob, 0, "compatible", &compat);
 	if (ret)
 		return -EINVAL;
-- 
1.9.1



More information about the U-Boot mailing list