diff options
author | Andre Przywara <andre.przywara@arm.com> | 2023-12-07 16:06:04 +0000 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2024-04-22 01:12:25 +0100 |
commit | 8cb3c49454ef6d72a20bb9c96f7ae841591ed33c (patch) | |
tree | 7b0dad12b363db2031c62e63dd9419ceb4239a10 | |
parent | 1a6828d0c54da2267cfc2a8abe7c51226f1cb80f (diff) | |
download | u-boot-8cb3c49454ef6d72a20bb9c96f7ae841591ed33c.zip u-boot-8cb3c49454ef6d72a20bb9c96f7ae841591ed33c.tar.gz u-boot-8cb3c49454ef6d72a20bb9c96f7ae841591ed33c.tar.bz2 |
sunxi: compile clock.c for SPL only
With the clock_twi_onoff() function now being called only from the SPL,
the whole clock.c file in arch/arm/mach-sunxi is needed by SPL code
only.
Remove the redundant #ifdef from the clock_init() function, actually
this function was already only called from the SPL.
Then adjust the Makefile to compile clock.c only with CONFIG_SPL_BUILD
defined.
This avoids unnecessary code in U-Boot proper and allows further
refactoring and code-split between the SPL and U-Boot proper.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-rw-r--r-- | arch/arm/mach-sunxi/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-sunxi/clock.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/mach-sunxi/Makefile b/arch/arm/mach-sunxi/Makefile index 1d4c70e..3f83c02 100644 --- a/arch/arm/mach-sunxi/Makefile +++ b/arch/arm/mach-sunxi/Makefile @@ -7,7 +7,6 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. obj-y += board.o -obj-y += clock.o obj-y += cpu_info.o obj-y += dram_helpers.o obj-$(CONFIG_SUN6I_PRCM) += prcm.o @@ -31,6 +30,7 @@ obj-y += timer.o endif ifdef CONFIG_SPL_BUILD +obj-y += clock.o obj-$(CONFIG_MACH_SUNIV) += dram_suniv.o obj-$(CONFIG_DRAM_SUN4I) += dram_sun4i.o obj-$(CONFIG_DRAM_SUN6I) += dram_sun6i.o diff --git a/arch/arm/mach-sunxi/clock.c b/arch/arm/mach-sunxi/clock.c index b6c68c9..5e9fa0d 100644 --- a/arch/arm/mach-sunxi/clock.c +++ b/arch/arm/mach-sunxi/clock.c @@ -23,10 +23,8 @@ __weak void gtbus_init(void) int clock_init(void) { -#ifdef CONFIG_SPL_BUILD clock_init_safe(); gtbus_init(); -#endif clock_init_uart(); clock_init_sec(); |