From: Michael Walle <mwalle@kernel.org>
Date: Fri, 13 Dec 2024 10:23:19 +0000 (+0100)
Subject: board: sl28: fix network on variant 3
X-Git-Tag: v2025.01-rc5-pxa1908~49^2~4
X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=ad7ebf1b989baf32e8917695a1611ea051356e35;p=u-boot.git

board: sl28: fix network on variant 3

Network is broken on variant 3 boards since commit 61ff13283c3b ("board:
sl28: move to OF_UPSTREAM") because it was removing the variant 3
handling. That is because at that time the var3 device tree was not
upstream. FWIW variant 3 is actually the same as the base variant, but
I've missed that the -u-boot.dtsi is not inlcuded in this case which
will set the ethernet alias.  Now that the var3 device tree is upstream,
just re-add it to the SPL handling again.

Fixes: 61ff13283c3b ("board: sl28: move to OF_UPSTREAM")
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

diff --git a/board/kontron/sl28/spl.c b/board/kontron/sl28/spl.c
index 45a4fc6512..6b31f5e3a7 100644
--- a/board/kontron/sl28/spl.c
+++ b/board/kontron/sl28/spl.c
@@ -50,9 +50,10 @@ int board_fit_config_name_match(const char *name)
 		return strcmp(name, "freescale/fsl-ls1028a-kontron-sl28-var1");
 	case 2:
 		return strcmp(name, "freescale/fsl-ls1028a-kontron-sl28-var2");
+	case 3:
+		return strcmp(name, "freescale/fsl-ls1028a-kontron-sl28-var3");
 	case 4:
 		return strcmp(name, "freescale/fsl-ls1028a-kontron-sl28-var4");
-	case 3:
 	default:
 		return strcmp(name, "freescale/fsl-ls1028a-kontron-sl28");
 	}
diff --git a/configs/kontron_sl28_defconfig b/configs/kontron_sl28_defconfig
index eae06b546d..1f68409325 100644
--- a/configs/kontron_sl28_defconfig
+++ b/configs/kontron_sl28_defconfig
@@ -78,7 +78,7 @@ CONFIG_CMD_RNG=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_UPSTREAM=y
-CONFIG_OF_LIST="freescale/fsl-ls1028a-kontron-sl28 freescale/fsl-ls1028a-kontron-sl28-var1 freescale/fsl-ls1028a-kontron-sl28-var2 freescale/fsl-ls1028a-kontron-sl28-var4"
+CONFIG_OF_LIST="freescale/fsl-ls1028a-kontron-sl28 freescale/fsl-ls1028a-kontron-sl28-var1 freescale/fsl-ls1028a-kontron-sl28-var2 freescale/fsl-ls1028a-kontron-sl28-var3 freescale/fsl-ls1028a-kontron-sl28-var4"
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y