arm: mach-k3: Only build init files for SPL
PATCH 1/2 arm: mach-k3: Only build init files for SPL
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.
--- arch/arm/mach-k3/Makefile | 13 ++++++++----- arch/arm/mach-k3/am625_init.c | 4 ---- arch/arm/mach-k3/am642_init.c | 2 -- arch/arm/mach-k3/am6_init.c | 2 -- arch/arm/mach-k3/j721e_init.c | 2 -- arch/arm/mach-k3/j721s2_init.c | 3 --- 6 files changed, 8 insertions(+), 18 deletions(-)
arch/arm/mach-k3/Makefile +8 -5
@@ -3,16 +3,19 @@ # Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/ # Lokesh Vutla <[email protected]> -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
arch/arm/mach-k3/am625_init.c +0 -4
@@ -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
@@ -267,5 +265,3 @@ u32 spl_boot_device(void)return bootmedia; } - -#endif /* CONFIG_SPL_BUILD */
arch/arm/mach-k3/am642_init.c +0 -2
@@ -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 )
arch/arm/mach-k3/am6_init.c +0 -2
@@ -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
arch/arm/mach-k3/j721e_init.c +0 -2
@@ -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
arch/arm/mach-k3/j721s2_init.c +0 -3
@@ -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
Signature · 1 line
2.36.1
PATCH 2/2 arm: mach-k3: Rename SOC_K3_AM6 to SOC_K3_AM654
The first AM6x device was the AM654x, but being the first we named it just AM6, since more devices have come out with this same prefix we should switch it to the normal convention of using the full name of the first compatibility device the series. This makes what device we are talking about more clear and matches all the K3 devices added since.
---
arch/arm/dts/Makefile | 2 +-
arch/arm/mach-k3/Kconfig | 14 +++++++-------
arch/arm/mach-k3/Makefile | 2 +-
arch/arm/mach-k3/{am6_init.c => am654_init.c} | 0
arch/arm/mach-k3/arm64-mmu.c | 4 ++--
arch/arm/mach-k3/include/mach/hardware.h | 2 +-
arch/arm/mach-k3/include/mach/spl.h | 2 +-
board/siemens/iot2050/Kconfig | 2 +-
board/ti/am65x/Kconfig | 4 ++--
configs/am65x_evm_a53_defconfig | 2 +-
configs/am65x_evm_r5_defconfig | 2 +-
configs/am65x_evm_r5_usbdfu_defconfig | 2 +-
configs/am65x_evm_r5_usbmsc_defconfig | 2 +-
configs/am65x_hs_evm_a53_defconfig | 2 +-
configs/am65x_hs_evm_r5_defconfig | 2 +-
configs/iot2050_defconfig | 2 +-
drivers/dma/ti/Makefile | 2 +-
drivers/dma/ti/k3-psil.c | 2 +-
drivers/ram/Kconfig | 2 +-
19 files changed, 26 insertions(+), 26 deletions(-)
rename arch/arm/mach-k3/{am6_init.c => am654_init.c} (100%)arch/arm/dts/Makefile +1 -1
@@ -1192,7 +1192,7 @@ dtb-$(CONFIG_STM32MP15x) += \ stm32mp15xx-dhcor-avenger96.dtb \ stm32mp15xx-dhcor-drc-compact.dtb -dtb-$(CONFIG_SOC_K3_AM6) += \ +dtb-$(CONFIG_SOC_K3_AM654) += \ k3-am654-base-board.dtb \ k3-am654-r5-base-board.dtb \ k3-am65-iot2050-spl.dtb \
arch/arm/mach-k3/Kconfig +7 -7
@@ -4,8 +4,8 @@ choice prompt "Texas Instruments' K3 based SoC select" optional -config SOC_K3_AM6 - bool "TI's K3 based AM6 SoC Family Support" +config SOC_K3_AM654 + bool "TI's K3 based AM654 SoC Family Support" config SOC_K3_J721E bool "TI's K3 based J721E SoC Family Support"
@@ -26,7 +26,7 @@ config SYS_SOC config SYS_K3_NON_SECURE_MSRAM_SIZE hex - default 0x80000 if SOC_K3_AM6 + default 0x80000 if SOC_K3_AM654 default 0x100000 if SOC_K3_J721E || SOC_K3_J721S2 default 0x1c0000 if SOC_K3_AM642 default 0x3c000 if SOC_K3_AM625
@@ -38,7 +38,7 @@ config SYS_K3_NON_SECURE_MSRAM_SIZE config SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE hex - default 0x58000 if SOC_K3_AM6 + default 0x58000 if SOC_K3_AM654 default 0xc0000 if SOC_K3_J721E || SOC_K3_J721S2 default 0x180000 if SOC_K3_AM642 default 0x38000 if SOC_K3_AM625
@@ -48,21 +48,21 @@ config SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE config SYS_K3_MCU_SCRATCHPAD_BASE hex - default 0x40280000 if SOC_K3_AM6 + default 0x40280000 if SOC_K3_AM654 default 0x40280000 if SOC_K3_J721E || SOC_K3_J721S2 help Describes the base address of MCU Scratchpad RAM. config SYS_K3_MCU_SCRATCHPAD_SIZE hex - default 0x200 if SOC_K3_AM6 + default 0x200 if SOC_K3_AM654 default 0x200 if SOC_K3_J721E || SOC_K3_J721S2 help Describes the size of MCU Scratchpad RAM. config SYS_K3_BOOT_PARAM_TABLE_INDEX hex - default 0x41c7fbfc if SOC_K3_AM6 + default 0x41c7fbfc if SOC_K3_AM654 default 0x41cffbfc if SOC_K3_J721E default 0x41cfdbfc if SOC_K3_J721S2 default 0x701bebfc if SOC_K3_AM642
arch/arm/mach-k3/Makefile +1 -1
@@ -11,7 +11,7 @@ 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_AM654) += am654_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
arch/arm/mach-k3/am654_init.c renamed from arch/arm/mach-k3/am6_init.c +0 -0
arch/arm/mach-k3/arm64-mmu.c +2 -2
@@ -13,7 +13,7 @@#include <asm/system.h> #include <asm/armv8/mmu.h> -#ifdef CONFIG_SOC_K3_AM6 +#ifdef CONFIG_SOC_K3_AM654 /* NR_DRAM_BANKS + 32bit IO + 64bit IO + terminator */ #define NR_MMU_REGIONS (CONFIG_NR_DRAM_BANKS + 5)
@@ -64,7 +64,7 @@ struct mm_region am654_mem_map[NR_MMU_REGIONS] = { };struct mm_region *mem_map = am654_mem_map; -#endif /* CONFIG_SOC_K3_AM6 */ +#endif /* CONFIG_SOC_K3_AM654 */ #ifdef CONFIG_SOC_K3_J721E
arch/arm/mach-k3/include/mach/hardware.h +1 -1
@@ -6,7 +6,7 @@#ifndef _ASM_ARCH_HARDWARE_H_#define _ASM_ARCH_HARDWARE_H_ -#ifdef CONFIG_SOC_K3_AM6 +#ifdef CONFIG_SOC_K3_AM654 #include "am6_hardware.h" #endif
arch/arm/mach-k3/include/mach/spl.h +1 -1
@@ -6,7 +6,7 @@#ifndef _ASM_ARCH_SPL_H_#define _ASM_ARCH_SPL_H_ -#ifdef CONFIG_SOC_K3_AM6 +#ifdef CONFIG_SOC_K3_AM654 #include "am6_spl.h" #endif
board/siemens/iot2050/Kconfig +1 -1
@@ -9,7 +9,7 @@ config TARGET_IOT2050_A53 bool "IOT2050 running on A53" select ARM64 - select SOC_K3_AM6 + select SOC_K3_AM654 select BOARD_LATE_INIT select SYS_DISABLE_DCACHE_OPS select BINMAN
board/ti/am65x/Kconfig +2 -2
@@ -10,7 +10,7 @@ choice config TARGET_AM654_A53_EVM bool "TI K3 based AM654 EVM running on A53" select ARM64 - select SOC_K3_AM6 + select SOC_K3_AM654 select SYS_DISABLE_DCACHE_OPS select BOARD_LATE_INIT imply TI_I2C_BOARD_DETECT
@@ -19,7 +19,7 @@ config TARGET_AM654_R5_EVM bool "TI K3 based AM654 EVM running on R5" select CPU_V7R select SYS_THUMB_BUILD - select SOC_K3_AM6 + select SOC_K3_AM654 select K3_LOAD_SYSFW select K3_AM654_DDRSS imply SYS_K3_SPL_ATF
configs/am65x_evm_a53_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x8000 CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=2 -CONFIG_SOC_K3_AM6=y +CONFIG_SOC_K3_AM654=y CONFIG_TARGET_AM654_A53_EVM=y CONFIG_ENV_SIZE=0x20000 CONFIG_ENV_OFFSET=0x680000
configs/am65x_evm_r5_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=2 -CONFIG_SOC_K3_AM6=y +CONFIG_SOC_K3_AM654=y CONFIG_K3_EARLY_CONS=y CONFIG_TARGET_AM654_R5_EVM=y CONFIG_ENV_SIZE=0x20000
configs/am65x_evm_r5_usbdfu_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=2 -CONFIG_SOC_K3_AM6=y +CONFIG_SOC_K3_AM654=y CONFIG_K3_EARLY_CONS=y CONFIG_TARGET_AM654_R5_EVM=y CONFIG_ENV_SIZE=0x20000
configs/am65x_evm_r5_usbmsc_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=2 -CONFIG_SOC_K3_AM6=y +CONFIG_SOC_K3_AM654=y CONFIG_K3_EARLY_CONS=y CONFIG_TARGET_AM654_R5_EVM=y CONFIG_ENV_SIZE=0x20000
configs/am65x_hs_evm_a53_defconfig +1 -1
@@ -7,7 +7,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x8000 CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=2 -CONFIG_SOC_K3_AM6=y +CONFIG_SOC_K3_AM654=y CONFIG_TARGET_AM654_A53_EVM=y CONFIG_ENV_SIZE=0x20000 CONFIG_ENV_OFFSET=0x680000
configs/am65x_hs_evm_r5_defconfig +1 -1
@@ -7,7 +7,7 @@ CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=2 -CONFIG_SOC_K3_AM6=y +CONFIG_SOC_K3_AM654=y CONFIG_K3_EARLY_CONS=y CONFIG_TARGET_AM654_R5_EVM=y CONFIG_ENV_SIZE=0x20000
configs/iot2050_defconfig +1 -1
@@ -7,7 +7,7 @@ CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=2 -CONFIG_SOC_K3_AM6=y +CONFIG_SOC_K3_AM654=y CONFIG_TARGET_IOT2050_A53=y CONFIG_ENV_SIZE=0x20000 CONFIG_ENV_OFFSET=0x680000
drivers/dma/ti/Makefile +1 -1
@@ -3,7 +3,7 @@ obj-$(CONFIG_TI_K3_NAVSS_UDMA) += k3-udma.o obj-$(CONFIG_TI_K3_PSIL) += k3-psil-data.o k3-psil-data-y += k3-psil.o -k3-psil-data-$(CONFIG_SOC_K3_AM6) += k3-psil-am654.o +k3-psil-data-$(CONFIG_SOC_K3_AM654) += k3-psil-am654.o k3-psil-data-$(CONFIG_SOC_K3_J721E) += k3-psil-j721e.o k3-psil-data-$(CONFIG_SOC_K3_J721S2) += k3-psil-j721s2.o k3-psil-data-$(CONFIG_SOC_K3_AM642) += k3-psil-am64.o
drivers/dma/ti/k3-psil.c +1 -1
@@ -16,7 +16,7 @@ struct psil_endpoint_config *psil_get_ep_config(u32 thread_id)int i;if (!soc_ep_map) { -if (IS_ENABLED (CONFIG_SOC_K3_AM6 )) +if (IS_ENABLED (CONFIG_SOC_K3_AM654 )) soc_ep_map = &am654_ep_map;else if (IS_ENABLED (CONFIG_SOC_K3_J721E )) soc_ep_map = &j721e_ep_map;
drivers/ram/Kconfig +1 -1
@@ -45,7 +45,7 @@ config MPC83XX_SDRAM config K3_AM654_DDRSS bool "Enable AM654 DDRSS support" - depends on RAM && SOC_K3_AM6 + depends on RAM && SOC_K3_AM654 help K3 based AM654 devices has DDR memory subsystem that comprises Synopys DDR controller, Synopsis DDR phy and wrapper logic to
Signature · 1 line
2.36.1
Re: [PATCH 2/2] arm: mach-k3: Rename SOC_K3_AM6 to SOC_K3_AM654
Quoted 7 lines · Andrew Davis
The first AM6x device was the AM654x, but being the first we named it just AM6, since more devices have come out with this same prefix we should switch it to the normal convention of using the full name of the first compatibility device the series. This makes what device we are talking about more clear and matches all the K3 devices added since.
Signed-off-by Andrew Davis <[email protected]>
Signature · 1 line
Tom
Re: [PATCH 2/2] arm: mach-k3: Rename SOC_K3_AM6 to SOC_K3_AM654
In reply to Andrew DavisQuoted 8 lines · Andrew Davis
The first AM6x device was the AM654x, but being the first we named it just AM6, since more devices have come out with this same prefix we should switch it to the normal convention of using the full name of the first compatibility device the series. This makes what device we are talking about more clear and matches all the K3 devices added since.
Signed-off-by Andrew Davis <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom
Quoted 5 lines · Andrew Davis
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 <[email protected]>
Signature · 1 line
Tom
Quoted 6 lines · Andrew Davis
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 <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom