diff mbox series

[RFC,WIP,v1,2/7] wandboard: Handle the imx6dl and imx6q revd1 boards

Message ID 20200114061314.148491-3-hs@denx.de
State New
Headers show
Series wandboard: add imx6dl rev d1 support | expand

Commit Message

Heiko Schocher Jan. 14, 2020, 6:13 a.m. UTC
From: Fabio Estevam <festevam at gmail.com>

Currently the only supported revd1 variant is imx6qp.

Add logic for supporting imx6dl and imx6q revd1 boards as well.

Reported-by: Heiko Schocher <hs at denx.de>
Signed-off-by: Fabio Estevam <festevam at gmail.com>
Signed-off-by: Heiko Schocher <hs at denx.de>
---

 board/wandboard/wandboard.c | 16 +++++++++++++---
 configs/wandboard_defconfig |  2 +-
 2 files changed, 14 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index f4534dd3dc6..05f36b7f5d5 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -483,12 +483,22 @@  int checkboard(void)
 #ifdef CONFIG_SPL_LOAD_FIT
 int board_fit_config_name_match(const char *name)
 {
+	/* imx6qp wandboard only comes in revd1 flavor */
+	if (is_mx6dqp()) {
+		if (!strcmp(name, "imx6qp-wandboard-revd1"))
+			return 0;
+	}
+
+	if (is_mx6dq() && is_revd1()) {
+		if (!strcmp(name, "imx6q-wandboard-revd1"))
+			return 0;
+	} else if ((is_mx6dl() || is_mx6solo()) && is_revd1()) {
+		if (!strcmp(name, "imx6dl-wandboard-revd1"))
+			return 0;
+	}
 	if (is_mx6dq()) {
 		if (!strcmp(name, "imx6q-wandboard-revb1"))
 			return 0;
-	} else if (is_mx6dqp()) {
-		if (!strcmp(name, "imx6qp-wandboard-revd1"))
-			return 0;
 	} else if (is_mx6dl() || is_mx6solo()) {
 		if (!strcmp(name, "imx6dl-wandboard-revb1"))
 			return 0;
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index ca564c59b80..d6bde4bf28b 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -43,7 +43,7 @@  CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revb1"
-CONFIG_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1"
+CONFIG_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1 imx6q-wandboard-revd1 imx6dl-wandboard-revd1"
 CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y