diff mbox series

[U-Boot,v2,2/5] toradex: configblock: generic wi-fi/bt handling

Message ID 20190712103509.25083-3-marcel@ziswiler.com
State Accepted
Commit d1aa1444e420ec682b68e6c7de51126dfae1f55c
Delegated to: Stefano Babic
Headers show
Series toradex: configblock: apalis-imx8 and colibri-imx8x fixes | expand

Commit Message

Marcel Ziswiler July 12, 2019, 10:35 a.m. UTC
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Make the interactive Wi-Fi/BT handling generic by pulling it out of the
Colibri iMX6ULL interactive part to be re-used for Apalis iMX8 and
Colibri iMX8X.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>

---

Changes in v2:
- Avoid line continuation as reported by checkpatch.
- Added R-bs.

 board/toradex/common/tdx-cfg-block.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

Comments

Stefano Babic July 20, 2019, 8:57 a.m. UTC | #1
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> Make the interactive Wi-Fi/BT handling generic by pulling it out of the
> Colibri iMX6ULL interactive part to be re-used for Apalis iMX8 and
> Colibri iMX8X.
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index 67e0557f67..451f8d4c11 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -291,6 +291,7 @@  static int get_cfgblock_interactive(void)
 	char message[CONFIG_SYS_CBSIZE];
 	char *soc;
 	char it = 'n';
+	char wb = 'n';
 	int len;
 
 	/* Unknown module by default */
@@ -300,10 +301,17 @@  static int get_cfgblock_interactive(void)
 		sprintf(message, "Is the module the 312 MHz version? [y/N] ");
 	else
 		sprintf(message, "Is the module an IT version? [y/N] ");
-
 	len = cli_readline(message);
 	it = console_buffer[0];
 
+#if defined(CONFIG_TARGET_APALIS_IMX8) || \
+		defined(CONFIG_TARGET_COLIBRI_IMX6ULL) || \
+		defined(CONFIG_TARGET_COLIBRI_IMX8X)
+	sprintf(message, "Does the module have Wi-Fi / Bluetooth? [y/N] ");
+	len = cli_readline(message);
+	wb = console_buffer[0];
+#endif
+
 	soc = env_get("soc");
 	if (!strcmp("mx6", soc)) {
 #ifdef CONFIG_TARGET_APALIS_IMX6
@@ -331,12 +339,6 @@  static int get_cfgblock_interactive(void)
 				tdx_hw_tag.prodid = COLIBRI_IMX6S;
 		}
 #elif CONFIG_TARGET_COLIBRI_IMX6ULL
-		char wb = 'n';
-
-		sprintf(message, "Does the module have Wi-Fi / Bluetooth? " \
-				 "[y/N] ");
-		len = cli_readline(message);
-		wb = console_buffer[0];
 		if (it == 'y' || it == 'Y') {
 			if (wb == 'y' || wb == 'Y')
 				tdx_hw_tag.prodid = COLIBRI_IMX6ULL_WIFI_BT_IT;