diff mbox series

[U-Boot,3/5] toradex: configblock: fix colibri imx8x target

Message ID 20190709094046.10635-4-marcel@ziswiler.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series toradex: configblock: apalis-imx8 and colibri-imx8x fixes | expand

Commit Message

Marcel Ziswiler July 9, 2019, 9:40 a.m. UTC
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

The Colibri iMX8X target got re-named late in the cycle which we forgot
to reflect here. Furthermore, it was missing the interactive part should
a customer have bricked his module and want to re-create the
configuration block. Fix this.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

 board/toradex/common/tdx-cfg-block.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

Comments

Igor Opaniuk July 9, 2019, 10:31 a.m. UTC | #1
On Tue, Jul 9, 2019 at 12:43 PM Marcel Ziswiler <marcel@ziswiler.com> wrote:
>
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> The Colibri iMX8X target got re-named late in the cycle which we forgot
> to reflect here. Furthermore, it was missing the interactive part should
> a customer have bricked his module and want to re-create the
> configuration block. Fix this.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> ---
>
>  board/toradex/common/tdx-cfg-block.c | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
> index 73f4a50567..90df5bb2ff 100644
> --- a/board/toradex/common/tdx-cfg-block.c
> +++ b/board/toradex/common/tdx-cfg-block.c
> @@ -8,7 +8,7 @@
>
>  #if defined(CONFIG_TARGET_APALIS_IMX6) || \
>         defined(CONFIG_TARGET_COLIBRI_IMX6) || \
> -       defined(CONFIG_TARGET_COLIBRI_IMX8QXP)
> +       defined(CONFIG_TARGET_COLIBRI_IMX8X)
>  #include <asm/arch/sys_proto.h>
>  #else
>  #define is_cpu_type(cpu) (0)
> @@ -356,9 +356,19 @@ static int get_cfgblock_interactive(void)
>                 tdx_hw_tag.prodid = COLIBRI_IMX7D;
>         else if (!strcmp("imx7s", soc))
>                 tdx_hw_tag.prodid = COLIBRI_IMX7S;
> -       else if (is_cpu_type(MXC_CPU_IMX8QXP))
> -               tdx_hw_tag.prodid = COLIBRI_IMX8QXP_WIFI_BT_IT;
> -       else if (!strcmp("tegra20", soc)) {
> +       else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> +               if (it == 'y' || it == 'Y') {
> +                       if (wb == 'y' || wb == 'Y')
> +                               tdx_hw_tag.prodid = COLIBRI_IMX8QXP_WIFI_BT_IT;
> +                       else
> +                               tdx_hw_tag.prodid = COLIBRI_IMX8QXP_IT;
> +               } else {
> +                       if (wb == 'y' || wb == 'Y')
> +                               tdx_hw_tag.prodid = COLIBRI_IMX8DX_WIFI_BT;
> +                       else
> +                               tdx_hw_tag.prodid = COLIBRI_IMX8DX;
> +               }
> +       } else if (!strcmp("tegra20", soc)) {
>                 if (it == 'y' || it == 'Y')
>                         if (gd->ram_size == 0x10000000)
>                                 tdx_hw_tag.prodid = COLIBRI_T20_256MB_IT;
> --
> 2.21.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot

Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Oleksandr Suvorov July 9, 2019, 2:06 p.m. UTC | #2
On Tue, 9 Jul 2019 at 12:43, Marcel Ziswiler <marcel@ziswiler.com> wrote:
>
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> The Colibri iMX8X target got re-named late in the cycle which we forgot
> to reflect here. Furthermore, it was missing the interactive part should
> a customer have bricked his module and want to re-create the
> configuration block. Fix this.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> ---
>
>  board/toradex/common/tdx-cfg-block.c | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
> index 73f4a50567..90df5bb2ff 100644
> --- a/board/toradex/common/tdx-cfg-block.c
> +++ b/board/toradex/common/tdx-cfg-block.c
> @@ -8,7 +8,7 @@
>
>  #if defined(CONFIG_TARGET_APALIS_IMX6) || \
>         defined(CONFIG_TARGET_COLIBRI_IMX6) || \
> -       defined(CONFIG_TARGET_COLIBRI_IMX8QXP)
> +       defined(CONFIG_TARGET_COLIBRI_IMX8X)
>  #include <asm/arch/sys_proto.h>
>  #else
>  #define is_cpu_type(cpu) (0)
> @@ -356,9 +356,19 @@ static int get_cfgblock_interactive(void)
>                 tdx_hw_tag.prodid = COLIBRI_IMX7D;
>         else if (!strcmp("imx7s", soc))
>                 tdx_hw_tag.prodid = COLIBRI_IMX7S;
> -       else if (is_cpu_type(MXC_CPU_IMX8QXP))
> -               tdx_hw_tag.prodid = COLIBRI_IMX8QXP_WIFI_BT_IT;
> -       else if (!strcmp("tegra20", soc)) {
> +       else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
> +               if (it == 'y' || it == 'Y') {
> +                       if (wb == 'y' || wb == 'Y')
> +                               tdx_hw_tag.prodid = COLIBRI_IMX8QXP_WIFI_BT_IT;
> +                       else
> +                               tdx_hw_tag.prodid = COLIBRI_IMX8QXP_IT;
> +               } else {
> +                       if (wb == 'y' || wb == 'Y')
> +                               tdx_hw_tag.prodid = COLIBRI_IMX8DX_WIFI_BT;
> +                       else
> +                               tdx_hw_tag.prodid = COLIBRI_IMX8DX;
> +               }
> +       } else if (!strcmp("tegra20", soc)) {
>                 if (it == 'y' || it == 'Y')
>                         if (gd->ram_size == 0x10000000)
>                                 tdx_hw_tag.prodid = COLIBRI_T20_256MB_IT;
> --
> 2.21.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
diff mbox series

Patch

diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index 73f4a50567..90df5bb2ff 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -8,7 +8,7 @@ 
 
 #if defined(CONFIG_TARGET_APALIS_IMX6) || \
 	defined(CONFIG_TARGET_COLIBRI_IMX6) || \
-	defined(CONFIG_TARGET_COLIBRI_IMX8QXP)
+	defined(CONFIG_TARGET_COLIBRI_IMX8X)
 #include <asm/arch/sys_proto.h>
 #else
 #define is_cpu_type(cpu) (0)
@@ -356,9 +356,19 @@  static int get_cfgblock_interactive(void)
 		tdx_hw_tag.prodid = COLIBRI_IMX7D;
 	else if (!strcmp("imx7s", soc))
 		tdx_hw_tag.prodid = COLIBRI_IMX7S;
-	else if (is_cpu_type(MXC_CPU_IMX8QXP))
-		tdx_hw_tag.prodid = COLIBRI_IMX8QXP_WIFI_BT_IT;
-	else if (!strcmp("tegra20", soc)) {
+	else if (is_cpu_type(MXC_CPU_IMX8QXP)) {
+		if (it == 'y' || it == 'Y') {
+			if (wb == 'y' || wb == 'Y')
+				tdx_hw_tag.prodid = COLIBRI_IMX8QXP_WIFI_BT_IT;
+			else
+				tdx_hw_tag.prodid = COLIBRI_IMX8QXP_IT;
+		} else {
+			if (wb == 'y' || wb == 'Y')
+				tdx_hw_tag.prodid = COLIBRI_IMX8DX_WIFI_BT;
+			else
+				tdx_hw_tag.prodid = COLIBRI_IMX8DX;
+		}
+	} else if (!strcmp("tegra20", soc)) {
 		if (it == 'y' || it == 'Y')
 			if (gd->ram_size == 0x10000000)
 				tdx_hw_tag.prodid = COLIBRI_T20_256MB_IT;