diff mbox series

[U-Boot,v4,07/20] board: mx6sabresd: Add board_fit_config_name_match to support FIT in SPL

Message ID 1549039198-16674-8-git-send-email-abel.vesa@nxp.com
State Accepted
Delegated to: Stefano Babic
Headers show
Series mx6sabre: Add DM and SPL FIT support | expand

Commit Message

Abel Vesa Feb. 1, 2019, 4:40 p.m. UTC
This matches one of the following three boards (or fails):
 - imx6q-sabresd
 - imx6qp-sabresd
 - imx6dl-sabresd

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
---
 board/freescale/mx6sabresd/mx6sabresd.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Fabio Estevam Feb. 2, 2019, 9:43 a.m. UTC | #1
On Fri, Feb 1, 2019 at 2:50 PM Abel Vesa <abel.vesa@nxp.com> wrote:
>
> This matches one of the following three boards (or fails):
>  - imx6q-sabresd
>  - imx6qp-sabresd
>  - imx6dl-sabresd
>
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>
Lukasz Majewski Feb. 2, 2019, 9:48 p.m. UTC | #2
On Fri, 1 Feb 2019 16:40:12 +0000
Abel Vesa <abel.vesa@nxp.com> wrote:

> This matches one of the following three boards (or fails):
>  - imx6q-sabresd
>  - imx6qp-sabresd
>  - imx6dl-sabresd
> 

Reviewed-by: Lukasz Majewski <lukma@denx.de>

> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>  board/freescale/mx6sabresd/mx6sabresd.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/board/freescale/mx6sabresd/mx6sabresd.c
> b/board/freescale/mx6sabresd/mx6sabresd.c index 0183ede..4688095
> 100644 --- a/board/freescale/mx6sabresd/mx6sabresd.c
> +++ b/board/freescale/mx6sabresd/mx6sabresd.c
> @@ -1062,3 +1062,21 @@ void board_init_f(ulong dummy)
>  	board_init_r(NULL, 0);
>  }
>  #endif
> +
> +#ifdef CONFIG_SPL_LOAD_FIT
> +int board_fit_config_name_match(const char *name)
> +{
> +	if (is_mx6dq()) {
> +		if (!strcmp(name, "imx6q-sabresd"))
> +			return 0;
> +	} else if (is_mx6dqp()) {
> +		if (!strcmp(name, "imx6qp-sabresd"))
> +			return 0;
> +	} else if (is_mx6dl()) {
> +		if (!strcmp(name, "imx6dl-sabresd"))
> +			return 0;
> +	}
> +
> +	return -1;
> +}
> +#endif




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
diff mbox series

Patch

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 0183ede..4688095 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -1062,3 +1062,21 @@  void board_init_f(ulong dummy)
 	board_init_r(NULL, 0);
 }
 #endif
+
+#ifdef CONFIG_SPL_LOAD_FIT
+int board_fit_config_name_match(const char *name)
+{
+	if (is_mx6dq()) {
+		if (!strcmp(name, "imx6q-sabresd"))
+			return 0;
+	} else if (is_mx6dqp()) {
+		if (!strcmp(name, "imx6qp-sabresd"))
+			return 0;
+	} else if (is_mx6dl()) {
+		if (!strcmp(name, "imx6dl-sabresd"))
+			return 0;
+	}
+
+	return -1;
+}
+#endif