All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Ziswiler <marcel@ziswiler.com>
To: u-boot@lists.denx.de
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Subject: [PATCH v2 10/11] configs: tdx: apalis_imx6: drop hw v1.0 support
Date: Wed, 13 Apr 2022 11:33:34 +0200	[thread overview]
Message-ID: <20220413093335.1372656-11-marcel@ziswiler.com> (raw)
In-Reply-To: <20220413093335.1372656-1-marcel@ziswiler.com>

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Drop optional support for the ancient Apalis iMX6 V1.0 hardware which
had the UART wired as DCE rather than DTE.

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

---

Changes in v2:
- Also drop setup_dcemode_uart() and setup_iomux_dce_uart() which are
  now unused.

 board/toradex/apalis_imx6/apalis_imx6.c | 38 ++-----------------------
 include/configs/apalis_imx6.h           |  6 +---
 2 files changed, 3 insertions(+), 41 deletions(-)

diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index a78d52d3fac..5604c4646cf 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -304,13 +304,6 @@ static void setup_dtemode_uart(void)
 	clrbits_le32((u32 *)(UART4_BASE + UCR3), UCR3_DCD | UCR3_RI);
 	clrbits_le32((u32 *)(UART5_BASE + UCR3), UCR3_DCD | UCR3_RI);
 }
-static void setup_dcemode_uart(void)
-{
-	clrbits_le32((u32 *)(UART1_BASE + UFCR), UFCR_DCEDTE);
-	clrbits_le32((u32 *)(UART2_BASE + UFCR), UFCR_DCEDTE);
-	clrbits_le32((u32 *)(UART4_BASE + UFCR), UFCR_DCEDTE);
-	clrbits_le32((u32 *)(UART5_BASE + UFCR), UFCR_DCEDTE);
-}
 
 static void setup_iomux_dte_uart(void)
 {
@@ -318,12 +311,6 @@ static void setup_iomux_dte_uart(void)
 	imx_iomux_v3_setup_multiple_pads(uart1_pads_dte,
 					 ARRAY_SIZE(uart1_pads_dte));
 }
-static void setup_iomux_dce_uart(void)
-{
-	setup_dcemode_uart();
-	imx_iomux_v3_setup_multiple_pads(uart1_pads_dce,
-					 ARRAY_SIZE(uart1_pads_dce));
-}
 
 #ifdef CONFIG_USB_EHCI_MX6
 int board_ehci_hcd_init(int port)
@@ -665,11 +652,8 @@ int board_early_init_f(void)
 {
 	imx_iomux_v3_setup_multiple_pads(pwr_intb_pads,
 					 ARRAY_SIZE(pwr_intb_pads));
-#ifndef CONFIG_TDX_APALIS_IMX6_V1_0
 	setup_iomux_dte_uart();
-#else
-	setup_iomux_dce_uart();
-#endif
+
 	return 0;
 }
 
@@ -714,23 +698,7 @@ int board_late_init(void)
 	rev = get_board_revision();
 	snprintf(env_str, ARRAY_SIZE(env_str), "%.4x", rev);
 	env_set("board_rev", env_str);
-
-#ifndef CONFIG_TDX_APALIS_IMX6_V1_0
-	if ((rev & 0xfff0) == 0x0100) {
-		char *fdt_env;
-
-		/* reconfigure the UART to DCE mode dynamically if on V1.0 HW */
-		setup_iomux_dce_uart();
-
-		/* if using the default device tree, use version for V1.0 HW */
-		fdt_env = env_get("fdt_file");
-		if ((fdt_env != NULL) && (strcmp(FDT_FILE, fdt_env) == 0)) {
-			env_set("fdt_file", FDT_FILE_V1_0);
-			printf("patching fdt_file to " FDT_FILE_V1_0 "\n");
-		}
-	}
-#endif /* CONFIG_TDX_APALIS_IMX6_V1_0 */
-#endif /* CONFIG_REVISION_TAG */
+#endif /* CONFIG_BOARD_LATE_INIT */
 
 #ifdef CONFIG_CMD_USB_SDP
 	if (is_boot_from_usb()) {
@@ -1129,10 +1097,8 @@ void board_init_f(ulong dummy)
 	/* UART clocks enabled and gd valid - init serial console */
 	preloader_console_init();
 
-#ifndef CONFIG_TDX_APALIS_IMX6_V1_0
 	/* Make sure we use dte mode */
 	setup_dtemode_uart();
-#endif
 
 	/* DDR initialization */
 	spl_dram_init();
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 3a27bbb6c87..57fd3ce12d0 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -89,12 +89,8 @@
 	"ramdisk_addr_r=0x12200000\0" \
 	"scriptaddr=0x17000000\0"
 
-#ifndef CONFIG_TDX_APALIS_IMX6_V1_0
 #define FDT_FILE "imx6q-apalis-eval.dtb"
-#define FDT_FILE_V1_0 "imx6q-apalis_v1_0-eval.dtb"
-#else
-#define FDT_FILE "imx6q-apalis_v1_0-eval.dtb"
-#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	BOOTENV \
 	"boot_file=zImage\0" \
-- 
2.34.1


  parent reply	other threads:[~2022-04-13  9:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13  9:33 [PATCH v2 00/11] toradex updates: assortment of fixes and improvements Marcel Ziswiler
2022-04-13  9:33 ` [PATCH v2 01/11] toradex: apalis-imx8x: drop support for apalis imx8x Marcel Ziswiler
2022-04-21 12:25   ` sbabic
2022-04-13  9:33 ` [PATCH v2 02/11] toradex: globally disable video support Marcel Ziswiler
2022-04-21 12:26   ` sbabic
2022-04-13  9:33 ` [PATCH v2 03/11] toradex: set default dhcp distroboot scriptname Marcel Ziswiler
2022-04-21 12:26   ` sbabic
2022-04-13  9:33 ` [PATCH v2 04/11] toradex: drop legacy nfsboot script Marcel Ziswiler
2022-04-21 12:26   ` sbabic
2022-04-13  9:33 ` [PATCH v2 05/11] configs: toradex: enable missing fit options Marcel Ziswiler
2022-04-21 12:26   ` sbabic
2022-04-13  9:33 ` [PATCH v2 06/11] configs: colibri-imx7/-emmc: enable booting from usb sdp Marcel Ziswiler
2022-04-21 12:26   ` sbabic
2022-04-13  9:33 ` [PATCH v2 07/11] configs: tdx: Do not overwrite fdtfile if it got set manually Marcel Ziswiler
2022-04-21 12:27   ` sbabic
2022-04-13  9:33 ` [PATCH v2 08/11] board: toradex: drop colibri pxa270 support Marcel Ziswiler
2022-04-21 12:27   ` sbabic
2022-04-13  9:33 ` [PATCH v2 09/11] board: colibri_imx7: fix usb start on solo Marcel Ziswiler
2022-04-21 12:26   ` sbabic
2022-04-13  9:33 ` Marcel Ziswiler [this message]
2022-04-21 12:25   ` [PATCH v2 10/11] configs: tdx: apalis_imx6: drop hw v1.0 support sbabic
2022-04-13  9:33 ` [PATCH v2 11/11] configs: tdx: apalis/colibri_imx6: use preboot as well Marcel Ziswiler
2022-04-21 12:27   ` sbabic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220413093335.1372656-11-marcel@ziswiler.com \
    --to=marcel@ziswiler.com \
    --cc=marcel.ziswiler@toradex.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.