summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/CarMediaLab/flea3/flea3.c2
-rw-r--r--board/Synology/common/Makefile2
-rw-r--r--board/beckhoff/mx53cx9020/mx53cx9020.c2
-rw-r--r--board/broadcom/bcmstb/bcmstb.c5
-rw-r--r--board/compulab/cm_fx6/cm_fx6.c2
-rw-r--r--board/davinci/da8xxevm/da850evm.c2
-rw-r--r--board/davinci/da8xxevm/omapl138_lcdk.c14
-rw-r--r--board/freescale/imxrt1020-evk/imxrt1020-evk.c5
-rw-r--r--board/freescale/imxrt1050-evk/imxrt1050-evk.c5
-rw-r--r--board/freescale/mx51evk/mx51evk.c2
-rw-r--r--board/freescale/mx53loco/mx53loco.c2
-rw-r--r--board/freescale/mx6sabreauto/mx6sabreauto.c2
-rw-r--r--board/friendlyarm/nanopi2/board.c8
-rw-r--r--board/friendlyarm/nanopi2/hwrev.c9
-rw-r--r--board/friendlyarm/nanopi2/hwrev.h2
-rw-r--r--board/ge/mx53ppd/mx53ppd.c2
-rw-r--r--board/inversepath/usbarmory/usbarmory.c2
-rw-r--r--board/lg/sniper/sniper.c2
-rw-r--r--board/nokia/rx51/rx51.c2
-rw-r--r--board/raspberrypi/rpi/rpi.c4
-rw-r--r--board/samsung/common/exynos5-dt-types.c26
-rw-r--r--board/samsung/goni/goni.c5
-rw-r--r--board/samsung/origen/origen.c5
-rw-r--r--board/samsung/trats2/trats2.c2
-rw-r--r--board/samsung/universal_c210/universal.c2
-rw-r--r--board/st/stm32f429-discovery/stm32f429-discovery.c5
-rw-r--r--board/st/stm32f429-evaluation/stm32f429-evaluation.c5
-rw-r--r--board/st/stm32f469-discovery/stm32f469-discovery.c5
-rw-r--r--board/st/stm32f746-disco/stm32f746-disco.c5
-rw-r--r--board/st/stm32h743-disco/stm32h743-disco.c5
-rw-r--r--board/st/stm32h743-eval/stm32h743-eval.c5
-rw-r--r--board/st/stm32h750-art-pi/stm32h750-art-pi.c5
-rw-r--r--board/ti/panda/panda.c2
-rw-r--r--board/ti/sdp4430/sdp.c2
-rw-r--r--board/toradex/apalis_imx6/apalis_imx6.c5
-rw-r--r--board/toradex/colibri_imx6/colibri_imx6.c5
-rw-r--r--board/toradex/common/tdx-common.c8
-rw-r--r--board/toradex/common/tdx-common.h1
38 files changed, 69 insertions, 105 deletions
diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c
index 12c5ac331f..ecd70ecbdc 100644
--- a/board/CarMediaLab/flea3/flea3.c
+++ b/board/CarMediaLab/flea3/flea3.c
@@ -196,12 +196,14 @@ int board_init(void)
return 0;
}
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
int rev = 0;
return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8;
}
+#endif
/*
* called prior to booting kernel or by 'fdt boardsetup' command
diff --git a/board/Synology/common/Makefile b/board/Synology/common/Makefile
index 62354cc2e8..f688b54906 100644
--- a/board/Synology/common/Makefile
+++ b/board/Synology/common/Makefile
@@ -2,4 +2,4 @@
#
# Copyright (C) 2021 Phil Sutter <phil@nwl.cc>
-obj-y += legacy.o
+obj-$(SUPPORT_PASSING_ATAGS) += legacy.o
diff --git a/board/beckhoff/mx53cx9020/mx53cx9020.c b/board/beckhoff/mx53cx9020/mx53cx9020.c
index a3657db826..e7b131836b 100644
--- a/board/beckhoff/mx53cx9020/mx53cx9020.c
+++ b/board/beckhoff/mx53cx9020/mx53cx9020.c
@@ -48,6 +48,7 @@ static const u32 CCAT_MODE_RUN = 0x0033DC8F;
DECLARE_GLOBAL_DATA_PTR;
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
@@ -59,6 +60,7 @@ u32 get_board_rev(void)
return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8;
}
+#endif
/*
* Set CCAT mode
diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c
index 076ac94144..276e59b3bd 100644
--- a/board/broadcom/bcmstb/bcmstb.c
+++ b/board/broadcom/bcmstb/bcmstb.c
@@ -38,11 +38,6 @@ int board_init(void)
return 0;
}
-u32 get_board_rev(void)
-{
- return 0;
-}
-
void reset_cpu(void)
{
}
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index f29b08247e..c54bffdae4 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -720,10 +720,12 @@ int dram_init(void)
return 0;
}
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
return cl_eeprom_get_board_rev(CONFIG_SYS_I2C_EEPROM_BUS);
}
+#endif
static struct mxc_serial_plat cm_fx6_mxc_serial_plat = {
.reg = (struct mxc_uart *)UART4_BASE,
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index f6ce3367f8..2436aab71c 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -232,6 +232,7 @@ const int lpsc_size = ARRAY_SIZE(lpsc);
#define REV_AM18X_EVM 0x100
+#ifdef CONFIG_REVISION_TAG
/*
* get_board_rev() - setup to pass kernel board revision information
* Returns:
@@ -259,6 +260,7 @@ u32 get_board_rev(void)
rev = 1;
return rev;
}
+#endif
int board_early_init_f(void)
{
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 43d9b69ae6..cd021cc8e5 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -143,20 +143,6 @@ const int lpsc_size = ARRAY_SIZE(lpsc);
#define CONFIG_DA850_EVM_MAX_CPU_CLK 456000000
#endif
-/*
- * get_board_rev() - setup to pass kernel board revision information
- * Returns:
- * bit[0-3] Maximum cpu clock rate supported by onboard SoC
- * 0000b - 300 MHz
- * 0001b - 372 MHz
- * 0010b - 408 MHz
- * 0011b - 456 MHz
- */
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_early_init_f(void)
{
/*
diff --git a/board/freescale/imxrt1020-evk/imxrt1020-evk.c b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
index 479e66bddc..54a733b12c 100644
--- a/board/freescale/imxrt1020-evk/imxrt1020-evk.c
+++ b/board/freescale/imxrt1020-evk/imxrt1020-evk.c
@@ -71,11 +71,6 @@ u32 spl_boot_device(void)
}
#endif
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_init(void)
{
gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
diff --git a/board/freescale/imxrt1050-evk/imxrt1050-evk.c b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
index eb492390db..6132916578 100644
--- a/board/freescale/imxrt1050-evk/imxrt1050-evk.c
+++ b/board/freescale/imxrt1050-evk/imxrt1050-evk.c
@@ -71,11 +71,6 @@ u32 spl_boot_device(void)
}
#endif
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_init(void)
{
gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index c8439a6347..46095acedf 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -35,6 +35,7 @@ int dram_init(void)
return 0;
}
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
u32 rev = get_cpu_rev();
@@ -42,6 +43,7 @@ u32 get_board_rev(void)
rev |= BOARD_REV_2_0 << BOARD_VER_OFFSET;
return rev;
}
+#endif
#define UART_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_100K_DOWN | PAD_CTL_DSE_HIGH)
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 0888630569..a9800ed769 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -32,6 +32,7 @@
DECLARE_GLOBAL_DATA_PTR;
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
@@ -46,6 +47,7 @@ u32 get_board_rev(void)
return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8;
}
+#endif
#define UART_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE_HIGH | \
PAD_CTL_PUS_100K_UP | PAD_CTL_ODE)
diff --git a/board/freescale/mx6sabreauto/mx6sabreauto.c b/board/freescale/mx6sabreauto/mx6sabreauto.c
index e92ef26d0a..9155dcfbd0 100644
--- a/board/freescale/mx6sabreauto/mx6sabreauto.c
+++ b/board/freescale/mx6sabreauto/mx6sabreauto.c
@@ -321,12 +321,14 @@ static void setup_gpmi_nand(void)
}
#endif
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
int rev = nxp_board_rev();
return (get_cpu_rev() & ~(0xF << 8)) | rev;
}
+#endif
static int ar8031_phy_fixup(struct phy_device *phydev)
{
diff --git a/board/friendlyarm/nanopi2/board.c b/board/friendlyarm/nanopi2/board.c
index c0fe2d546f..70e4dfcfa4 100644
--- a/board/friendlyarm/nanopi2/board.c
+++ b/board/friendlyarm/nanopi2/board.c
@@ -295,12 +295,12 @@ static void set_ether_addr(void)
env_set("ethaddr", ethaddr);
}
-#ifdef CONFIG_REVISION_TAG
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
static void set_board_rev(void)
{
char info[64] = {0, };
- snprintf(info, ARRAY_SIZE(info), "%02x", get_board_rev());
+ snprintf(info, ARRAY_SIZE(info), "%02x", get_board_revision());
env_set("board_rev", info);
}
#endif
@@ -310,7 +310,7 @@ static void set_dtb_name(void)
char info[64] = {0, };
snprintf(info, ARRAY_SIZE(info),
- "s5p4418-nanopi2-rev%02x.dtb", get_board_rev());
+ "s5p4418-nanopi2-rev%02x.dtb", get_board_revision());
env_set("dtb_name", info);
}
@@ -436,7 +436,7 @@ int board_late_init(void)
{
bd_update_env();
-#ifdef CONFIG_REVISION_TAG
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
set_board_rev();
#endif
set_dtb_name();
diff --git a/board/friendlyarm/nanopi2/hwrev.c b/board/friendlyarm/nanopi2/hwrev.c
index b1e23a48a8..585e08c944 100644
--- a/board/friendlyarm/nanopi2/hwrev.c
+++ b/board/friendlyarm/nanopi2/hwrev.c
@@ -80,11 +80,18 @@ void bd_base_rev_init(void)
}
/* To override __weak symbols */
-u32 get_board_rev(void)
+u32 get_board_revision(void)
{
return (base_rev << 8) | pcb_rev;
}
+#ifdef CONFIG_REVISION_TAG
+u32 get_board_rev(void)
+{
+ return get_board_revision();
+}
+#endif
+
const char *get_board_name(void)
{
bd_hwrev_init();
diff --git a/board/friendlyarm/nanopi2/hwrev.h b/board/friendlyarm/nanopi2/hwrev.h
index 1b1a828afb..403303131e 100644
--- a/board/friendlyarm/nanopi2/hwrev.h
+++ b/board/friendlyarm/nanopi2/hwrev.h
@@ -9,7 +9,7 @@
extern void bd_hwrev_init(void);
extern void bd_base_rev_init(void);
-extern u32 get_board_rev(void);
+extern u32 get_board_revision(void);
extern const char *get_board_name(void);
#endif /* __BD_HW_REV_H__ */
diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c
index 6174125e72..9c48883648 100644
--- a/board/ge/mx53ppd/mx53ppd.c
+++ b/board/ge/mx53ppd/mx53ppd.c
@@ -81,10 +81,12 @@ int dram_init_banksize(void)
return 0;
}
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
return get_cpu_rev() & ~(0xF << 8);
}
+#endif
#ifdef CONFIG_USB_EHCI_MX5
int board_ehci_hcd_init(int port)
diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c
index 086d0522c7..7dbb3a9143 100644
--- a/board/inversepath/usbarmory/usbarmory.c
+++ b/board/inversepath/usbarmory/usbarmory.c
@@ -27,6 +27,7 @@
DECLARE_GLOBAL_DATA_PTR;
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
struct iim_regs *iim = (struct iim_regs *)IMX_IIM_BASE;
@@ -38,6 +39,7 @@ u32 get_board_rev(void)
return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8;
}
+#endif
struct fsl_esdhc_cfg esdhc_cfg[1] = {
{MMC_SDHC1_BASE_ADDR}
diff --git a/board/lg/sniper/sniper.c b/board/lg/sniper/sniper.c
index a70166a542..86032d7fcd 100644
--- a/board/lg/sniper/sniper.c
+++ b/board/lg/sniper/sniper.c
@@ -156,11 +156,13 @@ int misc_init_r(void)
return 0;
}
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
/* Sold devices are expected to be at least revision F. */
return 6;
}
+#endif
void get_board_serial(struct tag_serialnr *serialnr)
{
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index fd3cec8358..99ca36fbbe 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -241,6 +241,7 @@ int board_init(void)
return 0;
}
+#ifdef CONFIG_REVISION_TAG
/*
* Routine: get_board_revision
* Description: Return board revision.
@@ -249,6 +250,7 @@ u32 get_board_rev(void)
{
return simple_strtol(hw_build_ptr, NULL, 16);
}
+#endif
/*
* Routine: setup_board_tags
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index df52a4689f..74697ba2f1 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -419,7 +419,7 @@ int misc_init_r(void)
return 0;
}
-static void get_board_rev(void)
+static void get_board_revision(void)
{
ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_board_rev, msg, 1);
int ret;
@@ -478,7 +478,7 @@ int board_init(void)
hw_watchdog_init();
#endif
- get_board_rev();
+ get_board_revision();
gd->bd->bi_boot_params = 0x100;
diff --git a/board/samsung/common/exynos5-dt-types.c b/board/samsung/common/exynos5-dt-types.c
index e2d5a7c9ba..554fc91cc1 100644
--- a/board/samsung/common/exynos5-dt-types.c
+++ b/board/samsung/common/exynos5-dt-types.c
@@ -47,18 +47,6 @@ struct odroid_rev_info odroid_info[] = {
{ EXYNOS5_BOARD_ODROID_UNKNOWN, 0, 4095, "unknown" },
};
-static unsigned int odroid_get_rev(void)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(odroid_info); i++) {
- if (odroid_info[i].board_type == gd->board_type)
- return odroid_info[i].board_rev;
- }
-
- return 0;
-}
-
/*
* Read ADC at least twice and check the resuls. If regulator providing voltage
* on to measured point was just turned on, first reads might require time
@@ -200,6 +188,19 @@ bool board_is_generic(void)
return false;
}
+#ifdef CONFIG_REVISION_TAG
+static unsigned int odroid_get_rev(void)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(odroid_info); i++) {
+ if (odroid_info[i].board_type == gd->board_type)
+ return odroid_info[i].board_rev;
+ }
+
+ return 0;
+}
+
/**
* get_board_rev() - return detected board revision.
*
@@ -212,6 +213,7 @@ u32 get_board_rev(void)
return odroid_get_rev();
}
+#endif
/**
* get_board_type() - returns board type string.
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index b32b82fc2d..ba25ba27b8 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -24,11 +24,6 @@
DECLARE_GLOBAL_DATA_PTR;
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_init(void)
{
/* Set Initial global variables */
diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c
index e17454ad77..7a91f44896 100644
--- a/board/samsung/origen/origen.c
+++ b/board/samsung/origen/origen.c
@@ -12,11 +12,6 @@
#include <asm/arch/pinmux.h>
#include <usb.h>
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int exynos_init(void)
{
return 0;
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index 59e6fbf4b0..a03dc87385 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -67,10 +67,12 @@ static void check_hw_revision(void)
board_rev = modelrev << 8;
}
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
return board_rev;
}
+#endif
static inline u32 get_model_rev(void)
{
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index 9ef11b8471..3764b5478b 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -33,10 +33,12 @@ DECLARE_GLOBAL_DATA_PTR;
unsigned int board_rev;
static int init_pmic_lcd(void);
+#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
return board_rev;
}
+#endif
int exynos_power_init(void)
{
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
index 46fcf907fc..34f9d6bc00 100644
--- a/board/st/stm32f429-discovery/stm32f429-discovery.c
+++ b/board/st/stm32f429-discovery/stm32f429-discovery.c
@@ -46,11 +46,6 @@ int dram_init_banksize(void)
return 0;
}
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_init(void)
{
gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
index 3b6df1f3ab..c170314ed8 100644
--- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c
+++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
@@ -40,11 +40,6 @@ int dram_init_banksize(void)
return 0;
}
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_init(void)
{
gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c
index c5df9b0d9c..122273a2ae 100644
--- a/board/st/stm32f469-discovery/stm32f469-discovery.c
+++ b/board/st/stm32f469-discovery/stm32f469-discovery.c
@@ -40,11 +40,6 @@ int dram_init_banksize(void)
return 0;
}
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_init(void)
{
gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
diff --git a/board/st/stm32f746-disco/stm32f746-disco.c b/board/st/stm32f746-disco/stm32f746-disco.c
index efa38a0e26..376bc06a98 100644
--- a/board/st/stm32f746-disco/stm32f746-disco.c
+++ b/board/st/stm32f746-disco/stm32f746-disco.c
@@ -77,12 +77,7 @@ u32 spl_boot_device(void)
{
return BOOT_DEVICE_XIP;
}
-
#endif
-u32 get_board_rev(void)
-{
- return 0;
-}
int board_late_init(void)
{
diff --git a/board/st/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c
index 4091d5f9fd..cc87230026 100644
--- a/board/st/stm32h743-disco/stm32h743-disco.c
+++ b/board/st/stm32h743-disco/stm32h743-disco.c
@@ -36,11 +36,6 @@ int dram_init_banksize(void)
return 0;
}
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_init(void)
{
gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c
index 4091d5f9fd..cc87230026 100644
--- a/board/st/stm32h743-eval/stm32h743-eval.c
+++ b/board/st/stm32h743-eval/stm32h743-eval.c
@@ -36,11 +36,6 @@ int dram_init_banksize(void)
return 0;
}
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_init(void)
{
gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100;
diff --git a/board/st/stm32h750-art-pi/stm32h750-art-pi.c b/board/st/stm32h750-art-pi/stm32h750-art-pi.c
index 5785b2e575..0ece8e79f2 100644
--- a/board/st/stm32h750-art-pi/stm32h750-art-pi.c
+++ b/board/st/stm32h750-art-pi/stm32h750-art-pi.c
@@ -41,11 +41,6 @@ int board_early_init_f(void)
return 0;
}
-u32 get_board_rev(void)
-{
- return 0;
-}
-
int board_late_init(void)
{
return 0;
diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c
index fda8d5f3c8..d8062997e5 100644
--- a/board/ti/panda/panda.c
+++ b/board/ti/panda/panda.c
@@ -312,6 +312,7 @@ void board_mmc_power_init(void)
#endif
#endif
+#ifdef CONFIG_REVISION_TAG
/*
* get_board_rev() - get board revision
*/
@@ -319,3 +320,4 @@ u32 get_board_rev(void)
{
return 0x20;
}
+#endif
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index 4895bfafd8..69726eb9ce 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -104,6 +104,7 @@ int spl_start_uboot(void)
}
#endif /* CONFIG_SPL_OS_BOOT */
+#ifdef CONFIG_REVISION_TAG
/*
* get_board_rev() - get board revision
*/
@@ -111,3 +112,4 @@ u32 get_board_rev(void)
{
return 0x20;
}
+#endif
diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c
index 74060daadd..f4cd28d49f 100644
--- a/board/toradex/apalis_imx6/apalis_imx6.c
+++ b/board/toradex/apalis_imx6/apalis_imx6.c
@@ -707,12 +707,11 @@ int board_init(void)
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
-#if defined(CONFIG_REVISION_TAG) && \
- defined(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)
+#if defined(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)
char env_str[256];
u32 rev;
- rev = get_board_rev();
+ rev = get_board_revision();
snprintf(env_str, ARRAY_SIZE(env_str), "%.4x", rev);
env_set("board_rev", env_str);
diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index 587d92a8e9..3b55f6c938 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -611,12 +611,11 @@ int board_init(void)
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
-#if defined(CONFIG_REVISION_TAG) && \
- defined(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)
+#if defined(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)
char env_str[256];
u32 rev;
- rev = get_board_rev();
+ rev = get_board_revision();
snprintf(env_str, ARRAY_SIZE(env_str), "%.4x", rev);
env_set("board_rev", env_str);
#endif
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index 061abf7537..9db4553e0f 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -32,8 +32,8 @@ static char tdx_car_rev_str[6];
static char *tdx_carrier_board_name;
#endif
-#ifdef CONFIG_REVISION_TAG
-u32 get_board_rev(void)
+#if defined(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)
+u32 get_board_revision(void)
{
/* Check validity */
if (!tdx_hw_tag.ver_major)
@@ -183,8 +183,8 @@ int ft_common_board_setup(void *blob, struct bd_info *bd)
#else /* CONFIG_TDX_CFG_BLOCK */
-#ifdef CONFIG_REVISION_TAG
-u32 get_board_rev(void)
+#if defined(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)
+u32 get_board_revision(void)
{
return 0;
}
diff --git a/board/toradex/common/tdx-common.h b/board/toradex/common/tdx-common.h
index 8020df5b44..c96e8754e9 100644
--- a/board/toradex/common/tdx-common.h
+++ b/board/toradex/common/tdx-common.h
@@ -10,6 +10,7 @@
#define TDX_USB_VID 0x1B67
int ft_common_board_setup(void *blob, struct bd_info *bd);
+u32 get_board_revision(void);
#if defined(CONFIG_DM_VIDEO)
int show_boot_logo(void);