Message ID | 20221025034547.76866-1-jun.nie@linaro.org |
---|---|
State | New |
Headers | show |
Series | imx: spl: Add weak reset_cpu() | expand |
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index ef00969a5e..6abbdb8909 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -388,3 +388,7 @@ void *spl_load_simple_fit_fix_load(const void *fit) return (void *)new; } + +__weak void reset_cpu(void) +{ +} diff --git a/board/ronetix/imx7-cm/spl.c b/board/ronetix/imx7-cm/spl.c index d36f734e49..864e95b187 100644 --- a/board/ronetix/imx7-cm/spl.c +++ b/board/ronetix/imx7-cm/spl.c @@ -115,10 +115,6 @@ void board_init_f(ulong dummy) board_init_r(NULL, 0); } -void reset_cpu(void) -{ -} - #define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \ PAD_CTL_HYS | PAD_CTL_PUE | \ PAD_CTL_PUS_PU47KOHM) diff --git a/board/technexion/pico-imx6ul/spl.c b/board/technexion/pico-imx6ul/spl.c index 251f5a1b7d..df01b5f8b5 100644 --- a/board/technexion/pico-imx6ul/spl.c +++ b/board/technexion/pico-imx6ul/spl.c @@ -147,10 +147,6 @@ void board_init_f(ulong dummy) board_init_r(NULL, 0); } -void reset_cpu(void) -{ -} - #define USDHC_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \ PAD_CTL_PUS_22K_UP | PAD_CTL_SPEED_LOW | \ PAD_CTL_DSE_80ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) diff --git a/board/technexion/pico-imx7d/spl.c b/board/technexion/pico-imx7d/spl.c index df5f058577..75d6aa8445 100644 --- a/board/technexion/pico-imx7d/spl.c +++ b/board/technexion/pico-imx7d/spl.c @@ -127,10 +127,6 @@ void board_init_f(ulong dummy) board_init_r(NULL, 0); } -void reset_cpu(void) -{ -} - #define USDHC_PAD_CTRL (PAD_CTL_DSE_3P3V_32OHM | PAD_CTL_SRE_SLOW | \ PAD_CTL_HYS | PAD_CTL_PUE | PAD_CTL_PUS_PU47KOHM) diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c index 8d2642f25d..b59d7cceea 100644 --- a/board/toradex/apalis_imx6/apalis_imx6.c +++ b/board/toradex/apalis_imx6/apalis_imx6.c @@ -1056,10 +1056,6 @@ int board_fit_config_name_match(const char *name) } #endif -void reset_cpu(void) -{ -} - #endif /* CONFIG_SPL_BUILD */ static struct mxc_serial_plat mxc_serial_plat = { diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index ab2ab587ff..261e46bc35 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -1116,10 +1116,6 @@ int board_fit_config_name_match(const char *name) } #endif -void reset_cpu(void) -{ -} - #endif /* CONFIG_SPL_BUILD */ static struct mxc_serial_plat mxc_serial_plat = {
Add weak reset_cpu() to reduce redundant code. And it ease the new platforms that only need a empty function to pass build without below compiling failure. arch/arm/lib/reset.o: In function `do_reset': /git/u-boot/arch/arm/lib/reset.c:42: undefined reference to `reset_cpu' make[1]: *** [scripts/Makefile.spl:526: spl/u-boot-spl] Error 1 make: *** [Makefile:2087: spl/u-boot-spl] Error 2 Signed-off-by: Jun Nie <jun.nie@linaro.org> --- arch/arm/mach-imx/spl.c | 4 ++++ board/ronetix/imx7-cm/spl.c | 4 ---- board/technexion/pico-imx6ul/spl.c | 4 ---- board/technexion/pico-imx7d/spl.c | 4 ---- board/toradex/apalis_imx6/apalis_imx6.c | 4 ---- board/toradex/colibri_imx6/colibri_imx6.c | 4 ---- 6 files changed, 4 insertions(+), 20 deletions(-)