All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 02/13] arm: imx: Remove unused CONFIG_xxx_TAG support
Date: Wed,  3 Feb 2021 21:24:04 -0500	[thread overview]
Message-ID: <20210204022415.20589-2-trini@konsulko.com> (raw)
In-Reply-To: <20210204022415.20589-1-trini@konsulko.com>

The i.MX8 family has never possibly supported ATAGs so we can remove
CONFIG_SERIAL_TAG support from that family.  Furthermore, the i.MX7
family is new enough to have never supported ATAGs so remove and disable
those options as well.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
While I strongly suspect i.MX5 and older have board-file based Linux
kernel support, I don't know where i.MX6 falls.  Especially if you
consider non-Linux OSes, so I didn't remove that.  But I would like to
know if we can also delete this code from there, or not.  Thanks!
---
 arch/arm/mach-imx/imx8/cpu.c   | 31 -------------------------
 arch/arm/mach-imx/mx7/soc.c    | 41 ----------------------------------
 arch/arm/mach-imx/mx7ulp/soc.c |  7 ------
 include/configs/mx7ulp_com.h   |  4 ----
 include/configs/mx7ulp_evk.h   |  5 -----
 include/configs/warp7.h        |  3 ---
 6 files changed, 91 deletions(-)

diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index 911d6a51d1e4..31fbe63496bf 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -171,37 +171,6 @@ enum boot_device get_boot_device(void)
 	return boot_dev;
 }
 
-#ifdef CONFIG_SERIAL_TAG
-#define FUSE_UNIQUE_ID_WORD0 16
-#define FUSE_UNIQUE_ID_WORD1 17
-void get_board_serial(struct tag_serialnr *serialnr)
-{
-	sc_err_t err;
-	u32 val1 = 0, val2 = 0;
-	u32 word1, word2;
-
-	if (!serialnr)
-		return;
-
-	word1 = FUSE_UNIQUE_ID_WORD0;
-	word2 = FUSE_UNIQUE_ID_WORD1;
-
-	err = sc_misc_otp_fuse_read(-1, word1, &val1);
-	if (err != SC_ERR_NONE) {
-		printf("%s fuse %d read error: %d\n", __func__, word1, err);
-		return;
-	}
-
-	err = sc_misc_otp_fuse_read(-1, word2, &val2);
-	if (err != SC_ERR_NONE) {
-		printf("%s fuse %d read error: %d\n", __func__, word2, err);
-		return;
-	}
-	serialnr->low = val1;
-	serialnr->high = val2;
-}
-#endif /*CONFIG_SERIAL_TAG*/
-
 #ifdef CONFIG_ENV_IS_IN_MMC
 __weak int board_mmc_get_env_dev(int devno)
 {
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index fda25ba66a36..2601ae8ce9c9 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -161,13 +161,6 @@ u32 get_cpu_rev(void)
 	return (type << 12) | reg;
 }
 
-#ifdef CONFIG_REVISION_TAG
-u32 __weak get_board_rev(void)
-{
-	return get_cpu_rev();
-}
-#endif
-
 static void imx_enet_mdio_fixup(void)
 {
 	struct iomuxc_gpr_base_regs *gpr_regs =
@@ -351,40 +344,6 @@ int arch_misc_init(void)
 }
 #endif
 
-#ifdef CONFIG_SERIAL_TAG
-/*
- * OCOTP_TESTER
- * i.MX 7Solo Applications Processor Reference Manual, Rev. 0.1, 08/2016
- * OCOTP_TESTER describes a unique ID based on silicon wafer
- * and die X/Y position
- *
- * OCOTOP_TESTER offset 0x410
- * 31:0 fuse 0
- * FSL-wide unique, encoded LOT ID STD II/SJC CHALLENGE/ Unique ID
- *
- * OCOTP_TESTER1 offset 0x420
- * 31:24 fuse 1
- * The X-coordinate of the die location on the wafer/SJC CHALLENGE/ Unique ID
- * 23:16 fuse 1
- * The Y-coordinate of the die location on the wafer/SJC CHALLENGE/ Unique ID
- * 15:11 fuse 1
- * The wafer number of the wafer on which the device was fabricated/SJC
- * CHALLENGE/ Unique ID
- * 10:0 fuse 1
- * FSL-wide unique, encoded LOT ID STD II/SJC CHALLENGE/ Unique ID
- */
-void get_board_serial(struct tag_serialnr *serialnr)
-{
-	struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
-	struct fuse_bank *bank = &ocotp->bank[0];
-	struct fuse_bank0_regs *fuse =
-		(struct fuse_bank0_regs *)bank->fuse_regs;
-
-	serialnr->low = fuse->tester0;
-	serialnr->high = fuse->tester1;
-}
-#endif
-
 void set_wdog_reset(struct wdog_regs *wdog)
 {
 	u32 reg = readw(&wdog->wcr);
diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c
index 8dd6b4d40e77..c0e7c399bfc4 100644
--- a/arch/arm/mach-imx/mx7ulp/soc.c
+++ b/arch/arm/mach-imx/mx7ulp/soc.c
@@ -49,13 +49,6 @@ u32 get_cpu_rev(void)
 	return (MXC_CPU_MX7ULP << 12) | (rom_version & 0xFF);
 }
 
-#ifdef CONFIG_REVISION_TAG
-u32 __weak get_board_rev(void)
-{
-	return get_cpu_rev();
-}
-#endif
-
 enum bt_mode get_boot_mode(void)
 {
 	u32 bt0_cfg = 0;
diff --git a/include/configs/mx7ulp_com.h b/include/configs/mx7ulp_com.h
index 28672c4f94c4..7ac445d02cd0 100644
--- a/include/configs/mx7ulp_com.h
+++ b/include/configs/mx7ulp_com.h
@@ -32,10 +32,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000 /* Fixed at 1MHz from TSTMR */
 
-#define CONFIG_INITRD_TAG
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(8 * SZ_1M)
 
diff --git a/include/configs/mx7ulp_evk.h b/include/configs/mx7ulp_evk.h
index 0c3103082cc8..78b41c789808 100644
--- a/include/configs/mx7ulp_evk.h
+++ b/include/configs/mx7ulp_evk.h
@@ -22,11 +22,6 @@
 
 #define CONFIG_SYS_HZ_CLOCK		1000000 /* Fixed@1Mhz from TSTMR */
 
-#define CONFIG_INITRD_TAG
-#define CONFIG_CMDLINE_TAG
-#define CONFIG_SETUP_MEMORY_TAGS
-/*#define CONFIG_REVISION_TAG*/
-
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(8 * SZ_1M)
 
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 8eb106027440..3ab42ffc2d48 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -21,9 +21,6 @@
 #define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE
 #define CONFIG_SYS_MMC_IMG_LOAD_PART	1
 
-/* Switch on SERIAL_TAG */
-#define CONFIG_SERIAL_TAG
-
 #define CONFIG_DFU_ENV_SETTINGS \
 	"dfu_alt_info=boot raw 0x2 0x1000 mmcpart 1\0" \
 
-- 
2.17.1

  reply	other threads:[~2021-02-04  2:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  2:24 [PATCH 01/13] arm: nanopi2: Remove unused code Tom Rini
2021-02-04  2:24 ` Tom Rini [this message]
2021-02-04  3:02   ` [PATCH 02/13] arm: imx: Remove unused CONFIG_xxx_TAG support Fabio Estevam
2021-02-04  3:49     ` Tom Rini
2021-02-04  9:56       ` Fabio Estevam
2021-02-04 13:26         ` Tom Rini
2021-02-04 16:08           ` Tom Rini
2021-02-04 16:44             ` Tom Rini
2021-02-04 19:20               ` Fabio Estevam
2021-02-04 16:10           ` Fabio Estevam
2021-02-04 16:33             ` Tom Rini
2021-02-04  2:24 ` [PATCH 03/13] arm: layerscape: Disable ATAG support on some platforms Tom Rini
2021-02-04  2:24 ` [PATCH 04/13] bcmstb: Disable ATAGs support Tom Rini
2021-02-04  2:24 ` [PATCH 05/13] arm: puma_rk3399: " Tom Rini
2021-02-04  2:24 ` [PATCH 06/13] arm: goni: Disable CONFIG_REVISION_TAG Tom Rini
2021-02-14 22:33   ` Jaehoon Chung
2021-02-04  2:24 ` [PATCH 07/13] arm: aspeed: Disable ATAGs support Tom Rini
2021-02-09  6:55   ` ChiaWei Wang
2021-02-04  2:24 ` [PATCH 08/13] arm: mediatek: " Tom Rini
2021-02-04  2:24 ` [PATCH 09/13] arm: mvebu: Disable ATAGs support on some platforms Tom Rini
2021-02-04  8:44   ` Stefan Roese
2021-02-04  2:24 ` [PATCH 10/13] arm: rcar2/3: Disable ATAGs support Tom Rini
2021-02-04  2:24 ` [PATCH 11/13] arm: s32v234: " Tom Rini
2021-02-04  2:24 ` [PATCH 12/13] arm: socfpga: arria5_secu1: " Tom Rini
2021-02-04  7:56   ` Holger Brunck
2021-02-04  2:24 ` [PATCH 13/13] arm: stm32: " Tom Rini
2021-02-08 16:34   ` Patrick DELAUNAY
2021-02-10 17:51     ` Tom Rini
2021-02-08 17:25 ` [PATCH 01/13] arm: nanopi2: Remove unused code Stefan Bosch
2021-04-10 17:14 ` Stefan Bosch
2021-04-10 17:15   ` Tom Rini

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=20210204022415.20589-2-trini@konsulko.com \
    --to=trini@konsulko.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.