]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: Only build init files for SPL
authorAndrew Davis <afd@ti.com>
Fri, 15 Jul 2022 15:25:26 +0000 (10:25 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 25 Jul 2022 17:02:04 +0000 (13:02 -0400)
The content of these files are only used in SPL builds. The contents are
already ifdef for the same, remove that and only include the whole file
in the build when building for SPL.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/mach-k3/Makefile
arch/arm/mach-k3/am625_init.c
arch/arm/mach-k3/am642_init.c
arch/arm/mach-k3/am6_init.c
arch/arm/mach-k3/j721e_init.c
arch/arm/mach-k3/j721s2_init.c

index 8459bef93bc8575620197e0878c01ffce03ae790..e17ad2214190dcc49e7000897f679e142a13e3af 100644 (file)
@@ -3,16 +3,19 @@
 # Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
 #      Lokesh Vutla <lokeshvutla@ti.com>
 
-obj-$(CONFIG_SOC_K3_AM6) += am6_init.o
-obj-$(CONFIG_SOC_K3_J721E) += j721e_init.o j721e/ j7200/
-obj-$(CONFIG_SOC_K3_J721S2) += j721s2_init.o j721s2/
-obj-$(CONFIG_SOC_K3_AM642) += am642_init.o
-obj-$(CONFIG_SOC_K3_AM625) += am625_init.o am62x/
+obj-$(CONFIG_SOC_K3_J721E) += j721e/ j7200/
+obj-$(CONFIG_SOC_K3_J721S2) += j721s2/
+obj-$(CONFIG_SOC_K3_AM625) += am62x/
 obj-$(CONFIG_ARM64) += arm64-mmu.o
 obj-$(CONFIG_CPU_V7R) += r5_mpu.o lowlevel_init.o
 obj-$(CONFIG_TI_SECURE_DEVICE) += security.o
 obj-$(CONFIG_ARM64) += cache.o
 ifeq ($(CONFIG_SPL_BUILD),y)
+obj-$(CONFIG_SOC_K3_AM6) += am6_init.o
+obj-$(CONFIG_SOC_K3_J721E) += j721e_init.o
+obj-$(CONFIG_SOC_K3_J721S2) += j721s2_init.o
+obj-$(CONFIG_SOC_K3_AM642) += am642_init.o
+obj-$(CONFIG_SOC_K3_AM625) += am625_init.o
 obj-$(CONFIG_K3_LOAD_SYSFW) += sysfw-loader.o
 endif
 obj-y += common.o
index dfd95b8053b53e38029e18c111f46d81f66e7868..8c4b3491b141171c1f40f955db89588bd36f109c 100644 (file)
@@ -15,8 +15,6 @@
 #include <dm/uclass-internal.h>
 #include <dm/pinctrl.h>
 
-#if defined(CONFIG_SPL_BUILD)
-
 /*
  * This uninitialized global variable would normal end up in the .bss section,
  * but the .bss is cleared between writing and reading this variable, so move
@@ -290,5 +288,3 @@ u32 spl_boot_device(void)
 
        return bootmedia;
 }
-
-#endif /* CONFIG_SPL_BUILD */
index b16de9c9f084ec73c4e94929cce59879c1a38177..8428322ed9a7f5cb553e11f6c486c5fd4530a8d5 100644 (file)
@@ -23,7 +23,6 @@
 #include <mmc.h>
 #include <dm/root.h>
 
-#if defined(CONFIG_SPL_BUILD)
 #define MCU_CTRL_MMR0_BASE                     0x04500000
 #define CTRLMMR_MCU_RST_CTRL                   0x04518170
 
@@ -348,7 +347,6 @@ u32 spl_boot_device(void)
        else
                return __get_backup_bootmedia(devstat);
 }
-#endif
 
 #if defined(CONFIG_SYS_K3_SPL_ATF)
 
index 7992918adcdcb28e017fdf051ecbc4abc9df8c77..6e833a6641ae07e6565ef8aee063ec6b58233588 100644 (file)
@@ -26,7 +26,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_SPL_BUILD
 #ifdef CONFIG_K3_LOAD_SYSFW
 #ifdef CONFIG_TI_SECURE_DEVICE
 struct fwl_data main_cbass_fwls[] = {
@@ -359,7 +358,6 @@ u32 spl_boot_device(void)
        else
                return __get_backup_bootmedia(devstat);
 }
-#endif
 
 #ifdef CONFIG_SYS_K3_SPL_ATF
 
index e56ca6d0f5ff91616f532be9197032451f5b1328..cb9f7eebec1a38deafd294479296e821683a1829 100644 (file)
@@ -24,7 +24,6 @@
 #include <mmc.h>
 #include <remoteproc.h>
 
-#ifdef CONFIG_SPL_BUILD
 #ifdef CONFIG_K3_LOAD_SYSFW
 #ifdef CONFIG_TI_SECURE_DEVICE
 struct fwl_data cbass_hc_cfg0_fwls[] = {
@@ -384,7 +383,6 @@ u32 spl_boot_device(void)
        else
                return __get_backup_bootmedia(main_devstat);
 }
-#endif
 
 #ifdef CONFIG_SYS_K3_SPL_ATF
 
index 2e64e44a80ea68dd25579391651feb5f6c011111..12da8136f9e1450d4809506b4570ab90bca85803 100644 (file)
@@ -22,8 +22,6 @@
 #include <mmc.h>
 #include <remoteproc.h>
 
-#ifdef CONFIG_SPL_BUILD
-
 static void ctrl_mmr_unlock(void)
 {
        /* Unlock all WKUP_CTRL_MMR0 module registers */
@@ -255,7 +253,6 @@ u32 spl_boot_device(void)
        else
                return __get_backup_bootmedia(main_devstat);
 }
-#endif
 
 #define J721S2_DEV_MCU_RTI0                    295
 #define J721S2_DEV_MCU_RTI1                    296