From 9774462e34faaa64a91eb9c68b438a52d22bba6a Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 30 Aug 2021 09:16:30 -0400 Subject: arm: Disable ATAGs support With the exceptions of ds109, ds414, icnova-a20-swac, nokia_rx51 and stemmy, disable ATAG support. A large number of platforms had enabled support but never supported a kernel so old as to require it. Further, some platforms are old enough to support both, but are well supported by devicetree booting, and have been for a number of years. This is because some of the ATAGs related functions have been re-used to provide the same kind of information, but for devicetree or just generally to inform the user. When needed still, rename these functions to get_board_revision() instead, to avoid conflicts. In other cases, these functions were simply unused, so drop them. Cc: Andre Przywara Cc: Jagan Teki Cc: Phil Sutter Cc: Stefan Bosch Signed-off-by: Tom Rini --- board/friendlyarm/nanopi2/board.c | 8 ++++---- board/friendlyarm/nanopi2/hwrev.c | 9 ++++++++- board/friendlyarm/nanopi2/hwrev.h | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'board/friendlyarm') 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__ */ -- cgit v1.2.3