[PATCH 02/13] arm: imx: Remove unused CONFIG_xxx_TAG support
Tom Rini
trini at konsulko.com
Thu Feb 4 03:24:04 CET 2021
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 at denx.de>
Cc: Fabio Estevam <festevam at gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx at nxp.com>
Signed-off-by: Tom Rini <trini at 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 at 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
More information about the U-Boot
mailing list