diff mbox series

[U-Boot,V2,06/12] imx: mx6sabresd: implement board_fit_config_name_match

Message ID 1503901744-21087-6-git-send-email-peng.fan@nxp.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series [U-Boot,V2,01/12] scripts: spl: fix typo | expand

Commit Message

Peng Fan Aug. 28, 2017, 6:28 a.m. UTC
Implement board_fit_config_name_match.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
---

V2: none

 board/freescale/mx6sabresd/mx6sabresd.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff mbox series

Patch

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 9a562b3..fa75ab0 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -734,6 +734,19 @@  int spl_start_uboot(void)
 }
 #endif
 
+#ifdef CONFIG_SPL_LOAD_FIT
+int board_fit_config_name_match(const char *name)
+{
+	if (is_mx6dq() && !strcmp(name, "imx6q-sabresd"))
+		return 0;
+	else if (is_mx6sdl() && !strcmp(name, "imx6dl-sabresd"))
+		return 0;
+	else if (is_mx6dqp() && !strcmp(name, "imx6qp-sabresd"))
+		return 0;
+	return -EINVAL;
+}
+#endif
+
 static void ccgr_init(void)
 {
 	struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;