aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-09-21 12:26:09 -0400
committerTom Rini <trini@konsulko.com>2023-09-21 12:26:09 -0400
commitae7fd1646887a91f2c27b76502c83d8e91ee0617 (patch)
tree45faef62696e32ee51e970b891278e57a9f4040e
parent3f09b9fffe8e43e3e632ed22b3bdb1c66fe85b4d (diff)
downloadu-boot-TEST/cleanup-board-dirs.zip
u-boot-TEST/cleanup-board-dirs.tar.gz
u-boot-TEST/cleanup-board-dirs.tar.bz2
exynos: Cleanup exynos_initTEST/cleanup-board-dirs
- None of the callers perform error checking and based on the non-empty versions of this function, there's no checking to be done, so make this a void. - Add a default weak version of the function. - Remove the empty versions of exynos_init now that we have a weak version. Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--arch/arm/mach-exynos/include/mach/board.h2
-rw-r--r--board/samsung/axy17lte/Makefile3
-rw-r--r--board/samsung/axy17lte/axy17lte.c11
-rw-r--r--board/samsung/common/board.c4
-rw-r--r--board/samsung/common/exynos5-dt.c5
-rw-r--r--board/samsung/espresso7420/Makefile6
-rw-r--r--board/samsung/espresso7420/espresso7420.c13
-rw-r--r--board/samsung/odroid/odroid.c4
-rw-r--r--board/samsung/origen/origen.c5
-rw-r--r--board/samsung/trats/trats.c14
-rw-r--r--board/samsung/trats2/trats2.c4
-rw-r--r--board/samsung/universal_c210/universal.c4
12 files changed, 13 insertions, 62 deletions
diff --git a/arch/arm/mach-exynos/include/mach/board.h b/arch/arm/mach-exynos/include/mach/board.h
index 44ebdb8..a167f96 100644
--- a/arch/arm/mach-exynos/include/mach/board.h
+++ b/arch/arm/mach-exynos/include/mach/board.h
@@ -11,7 +11,7 @@
* Exynos baord specific changes for
* board_init
*/
-int exynos_init(void);
+void exynos_init(void);
/*
* Exynos board specific changes for
diff --git a/board/samsung/axy17lte/Makefile b/board/samsung/axy17lte/Makefile
deleted file mode 100644
index 4e11f28..0000000
--- a/board/samsung/axy17lte/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-obj-y += axy17lte.o
diff --git a/board/samsung/axy17lte/axy17lte.c b/board/samsung/axy17lte/axy17lte.c
deleted file mode 100644
index c38297a..0000000
--- a/board/samsung/axy17lte/axy17lte.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Samsung A5Y17 and A3Y17 LTE boards based on Exynos 7880 and Exynos 7870 SoCs
- */
-
-#include <common.h>
-
-int exynos_init(void)
-{
- return 0;
-}
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 663d7ca..38d4ce3 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -43,6 +43,10 @@ __weak int exynos_early_init_f(void)
return 0;
}
+__weak void exynos_init(void)
+{
+}
+
__weak int exynos_power_init(void)
{
return 0;
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c
index 726b7f0..72e0cec 100644
--- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c
@@ -37,11 +37,6 @@
DECLARE_GLOBAL_DATA_PTR;
-int exynos_init(void)
-{
- return 0;
-}
-
static int exynos_set_regulator(const char *name, uint uv)
{
struct udevice *dev;
diff --git a/board/samsung/espresso7420/Makefile b/board/samsung/espresso7420/Makefile
deleted file mode 100644
index bb882ea..0000000
--- a/board/samsung/espresso7420/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2016 Samsung Electronics
-# Thomas Abraham <thomas.ab@samsung.com>
-
-obj-y += espresso7420.o
diff --git a/board/samsung/espresso7420/espresso7420.c b/board/samsung/espresso7420/espresso7420.c
deleted file mode 100644
index 9f6fa89..0000000
--- a/board/samsung/espresso7420/espresso7420.c
+++ /dev/null
@@ -1,13 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Espresso7420 board file
- * Copyright (C) 2016 Samsung Electronics
- * Thomas Abraham <thomas.ab@samsung.com>
- */
-
-#include <common.h>
-
-int exynos_init(void)
-{
- return 0;
-}
diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c
index 39a60e4..2c5bafa 100644
--- a/board/samsung/odroid/odroid.c
+++ b/board/samsung/odroid/odroid.c
@@ -422,11 +422,9 @@ int exynos_early_init_f(void)
return 0;
}
-int exynos_init(void)
+void exynos_init(void)
{
board_gpio_init();
-
- return 0;
}
int exynos_power_init(void)
diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c
index 7a91f44..ddf6a2b 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>
-int exynos_init(void)
-{
- return 0;
-}
-
int board_usb_init(int index, enum usb_init_type init)
{
return 0;
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 1608d60..6a3e5b2 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -40,17 +40,8 @@ u32 get_board_rev(void)
}
#endif
-static void check_hw_revision(void);
struct dwc2_plat_otg_data s5pc210_otg_data;
-int exynos_init(void)
-{
- check_hw_revision();
- printf("HW Revision:\t0x%x\n", board_rev);
-
- return 0;
-}
-
#if !CONFIG_IS_ENABLED(DM_I2C) /* TODO(maintainer): Convert to driver model */
static void trats_low_power_mode(void)
{
@@ -215,6 +206,11 @@ static void check_hw_revision(void)
board_rev |= hwrev;
}
+void exynos_init(void)
+{
+ check_hw_revision();
+ printf("HW Revision:\t0x%x\n", board_rev);
+}
#ifdef CONFIG_USB_GADGET
static int s5pc210_phy_control(int on)
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index 93c9714..81ccc12 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -107,7 +107,7 @@ int exynos_early_init_f(void)
return 0;
}
-int exynos_init(void)
+void exynos_init(void)
{
struct exynos4_power *pwr =
(struct exynos4_power *)samsung_get_base_power();
@@ -124,8 +124,6 @@ int exynos_init(void)
*/
writel(0, &pwr->inform4);
writel(0, &pwr->inform5);
-
- return 0;
}
int exynos_power_init(void)
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index 37c9d7f..2d61dff 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -265,7 +265,7 @@ static int init_pmic_lcd(void)
return 0;
}
-int exynos_init(void)
+void exynos_init(void)
{
gd->bd->bi_arch_number = MACH_TYPE_UNIVERSAL_C210;
@@ -293,6 +293,4 @@ int exynos_init(void)
check_hw_revision();
printf("HW Revision:\t0x%x\n", board_rev);
-
- return 0;
}