Skip to contentSkip to conversation

ARM: imx6logic: Stop overwriting fdt_file if manually set

PATCH New Adam Ford 2 participants 3 messages Mar 13, 2019 – Jun 10, 2019 Arm i.MX and Layerscape

lore
Share & tools
lore

Adam Ford

author
#0 lore raw

PATCH 1/1 ARM: imx6logic: Stop overwriting fdt_file if manually set

The board file uses the processor type to determine what dtb file is set. Unfortunately, if the user wants to manually set this, it get gets overwritten upon boot. This patch adds a check to see if the value is already set and only changes it if the value is empty.

board/logicpd/imx6/imx6logic.c +2 -1
index b17a3b1d39..53e609e15c 100644
@@ -152,7 +152,8 @@ int board_late_init(void)
 
 	if (is_mx6dq()) {
 		env_set("board_rev", "MX6DQ");
-		env_set("fdt_file", "imx6q-logicpd.dtb");
+		if (!env_get("fdt_file"))
+			env_set("fdt_file", "imx6q-logicpd.dtb");
 	}
 
 	return 0;
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/1 ARM: imx6logic: Stop overwriting fdt_file if manually set

Quoted 9 lines · Adam Ford

The board file uses the processor type to determine what dtb file is set. Unfortunately, if the user wants to manually set this, it get gets overwritten upon boot. This patch adds a check to see if the value is already set and only changes it if the value is empty.

Gentle nudge to try and get this into the next release.

thanks

adam

Quoted 19 lines
board/logicpd/imx6/imx6logic.c +2 -2
index b17a3b1d39..53e609e15c 100644
@@ -152,7 +152,8 @@ int board_late_init(void)
 
        if (is_mx6dq()) {
                env_set("board_rev", "MX6DQ");
-               env_set("fdt_file", "imx6q-logicpd.dtb");
+               if (!env_get("fdt_file"))
+                       env_set("fdt_file", "imx6q-logicpd.dtb");
        }
 
        return 0;
--

2.17.1

#2 lore raw

PATCH 1/1 ARM: imx6logic: Stop overwriting fdt_file if

In reply to Adam Ford
Quoted 11 lines

The board file uses the processor type to determine what dtb file is set. Unfortunately, if the user wants to manually set this, it get gets overwritten upon boot. This patch adds a check to see if the value is already set and only changes it if the value is empty.

board/logicpd/imx6/imx6logic.c +0 -0
index b17a3b1d39..53e609e15c 100644

board/logicpd/imx6/imx6logic.c int board_late_init(void) · line 159

Quoted 9 lines
board/logicpd/imx6/imx6logic.c +2 -1
@@ -152,7 +152,8 @@ int board_late_init(void)
 
 	if (is_mx6dq()) {
 		env_set("board_rev", "MX6DQ");
-		env_set("fdt_file", "imx6q-logicpd.dtb");
+		if (!env_get("fdt_file"))
+			env_set("fdt_file", "imx6q-logicpd.dtb");
 	}
 
 	return 0;

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================