]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: Move code specific to a SoC into that SoC's directory
authorAndrew Davis <afd@ti.com>
Fri, 10 May 2024 20:21:24 +0000 (15:21 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 13 May 2024 22:51:14 +0000 (16:51 -0600)
Each SoC now has a directory in mach-k3, let's move the SoC specific
files into their respective directories.

Signed-off-by: Andrew Davis <afd@ti.com>
23 files changed:
arch/arm/mach-k3/Makefile
arch/arm/mach-k3/am62ax/Makefile [new file with mode: 0644]
arch/arm/mach-k3/am62ax/am62a7_fdt.c [moved from arch/arm/mach-k3/am62a7_fdt.c with 93% similarity]
arch/arm/mach-k3/am62ax/am62a7_init.c [moved from arch/arm/mach-k3/am62a7_init.c with 99% similarity]
arch/arm/mach-k3/am62px/Makefile [new file with mode: 0644]
arch/arm/mach-k3/am62px/am62p5_init.c [moved from arch/arm/mach-k3/am62p5_init.c with 99% similarity]
arch/arm/mach-k3/am62x/Makefile
arch/arm/mach-k3/am62x/am625_fdt.c [moved from arch/arm/mach-k3/am625_fdt.c with 98% similarity]
arch/arm/mach-k3/am62x/am625_init.c [moved from arch/arm/mach-k3/am625_init.c with 99% similarity]
arch/arm/mach-k3/am64x/Makefile
arch/arm/mach-k3/am64x/am642_init.c [moved from arch/arm/mach-k3/am642_init.c with 99% similarity]
arch/arm/mach-k3/am65x/Makefile [new file with mode: 0644]
arch/arm/mach-k3/am65x/am654_fdt.c [moved from arch/arm/mach-k3/am654_fdt.c with 88% similarity]
arch/arm/mach-k3/am65x/am654_init.c [moved from arch/arm/mach-k3/am654_init.c with 99% similarity]
arch/arm/mach-k3/j721e/Makefile [new file with mode: 0644]
arch/arm/mach-k3/j721e/j721e_fdt.c [moved from arch/arm/mach-k3/j721e_fdt.c with 88% similarity]
arch/arm/mach-k3/j721e/j721e_init.c [moved from arch/arm/mach-k3/j721e_init.c with 99% similarity]
arch/arm/mach-k3/j721s2/Makefile [new file with mode: 0644]
arch/arm/mach-k3/j721s2/j721s2_fdt.c [moved from arch/arm/mach-k3/j721s2_fdt.c with 88% similarity]
arch/arm/mach-k3/j721s2/j721s2_init.c [moved from arch/arm/mach-k3/j721s2_init.c with 99% similarity]
arch/arm/mach-k3/j784s4/Makefile [new file with mode: 0644]
arch/arm/mach-k3/j784s4/j784s4_fdt.c [moved from arch/arm/mach-k3/j784s4_fdt.c with 92% similarity]
arch/arm/mach-k3/j784s4/j784s4_init.c [moved from arch/arm/mach-k3/j784s4_init.c with 99% similarity]

index 3101f57d3248cb1688ef364b04003bd757efd940..2b3ebd5c5354d234635353853bc92094f1274cb7 100644 (file)
@@ -6,24 +6,12 @@
 obj-$(CONFIG_ARM64) += arm64/
 obj-$(CONFIG_CPU_V7R) += r5/
 obj-$(CONFIG_OF_LIBFDT) += common_fdt.o
-ifeq ($(CONFIG_OF_LIBFDT)$(CONFIG_OF_SYSTEM_SETUP),yy)
-obj-$(CONFIG_SOC_K3_AM654) += am654_fdt.o
-obj-$(CONFIG_SOC_K3_J721E) += j721e_fdt.o
-obj-$(CONFIG_SOC_K3_J721S2) += j721s2_fdt.o
-obj-$(CONFIG_SOC_K3_AM625) += am625_fdt.o
-obj-$(CONFIG_SOC_K3_AM62A7) += am62a7_fdt.o
-obj-$(CONFIG_SOC_K3_J784S4) += j784s4_fdt.o
-endif
-ifeq ($(CONFIG_SPL_BUILD),y)
-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
-obj-$(CONFIG_SOC_K3_AM625) += am625_init.o
-obj-$(CONFIG_SOC_K3_AM62A7) += am62a7_init.o
-obj-$(CONFIG_SOC_K3_J784S4) += j784s4_init.o
-obj-$(CONFIG_SOC_K3_AM62P5) += am62p5_init.o
-endif
 obj-y += common.o security.o
+obj-$(CONFIG_SOC_K3_AM62A7) += am62ax/
+obj-$(CONFIG_SOC_K3_AM62P5) += am62px/
 obj-$(CONFIG_SOC_K3_AM625) += am62x/
 obj-$(CONFIG_SOC_K3_AM642) += am64x/
+obj-$(CONFIG_SOC_K3_AM654) += am65x/
+obj-$(CONFIG_SOC_K3_J721E) += j721e/
+obj-$(CONFIG_SOC_K3_J721S2) += j721s2/
+obj-$(CONFIG_SOC_K3_J784S4) += j784s4/
diff --git a/arch/arm/mach-k3/am62ax/Makefile b/arch/arm/mach-k3/am62ax/Makefile
new file mode 100644 (file)
index 0000000..1717ca3
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+#      Andrew Davis <afd@ti.com>
+
+obj-$(CONFIG_OF_SYSTEM_SETUP) += am62a7_fdt.o
+obj-$(CONFIG_SPL_BUILD) += am62a7_init.o
similarity index 93%
rename from arch/arm/mach-k3/am62a7_fdt.c
rename to arch/arm/mach-k3/am62ax/am62a7_fdt.c
index d67f012a5dcc48bb00300ca2c58c9bdc8db237c4..7f764ab36b564de2fb28ecd9c41d33de441165d5 100644 (file)
@@ -4,9 +4,10 @@
  */
 
 #include <asm/hardware.h>
-#include "common_fdt.h"
 #include <fdt_support.h>
 
+#include "../common_fdt.h"
+
 int ft_system_setup(void *blob, struct bd_info *bd)
 {
        fdt_fixup_reserved(blob, "tfa", CONFIG_K3_ATF_LOAD_ADDR, 0x80000);
similarity index 99%
rename from arch/arm/mach-k3/am62a7_init.c
rename to arch/arm/mach-k3/am62ax/am62a7_init.c
index 658828cf75f900392ef1d649c2cd07e1e12c3e2b..0f62f39075bae071741e17b403a4dd5895c9b274 100644 (file)
@@ -8,12 +8,13 @@
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
-#include "sysfw-loader.h"
-#include "common.h"
 #include <dm.h>
 #include <dm/uclass-internal.h>
 #include <dm/pinctrl.h>
 
+#include "../sysfw-loader.h"
+#include "../common.h"
+
 struct fwl_data cbass_main_fwls[] = {
        { "FSS_DAT_REG3", 7, 8 },
 };
diff --git a/arch/arm/mach-k3/am62px/Makefile b/arch/arm/mach-k3/am62px/Makefile
new file mode 100644 (file)
index 0000000..5902862
--- /dev/null
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+#      Andrew Davis <afd@ti.com>
+
+obj-$(CONFIG_SPL_BUILD) += am62p5_init.o
similarity index 99%
rename from arch/arm/mach-k3/am62p5_init.c
rename to arch/arm/mach-k3/am62px/am62p5_init.c
index aab99aa0c958f84de7f181932f2e0cf4df0f01ef..34ed01cd78ca81cff6ecee6f73ce76cac1a68378 100644 (file)
@@ -8,12 +8,13 @@
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
-#include "sysfw-loader.h"
-#include "common.h"
 #include <dm.h>
 #include <dm/uclass-internal.h>
 #include <dm/pinctrl.h>
 
+#include "../sysfw-loader.h"
+#include "../common.h"
+
 struct fwl_data cbass_main_fwls[] = {
        { "FSS_DAT_REG3", 7, 8 },
 };
index acf09c3426c8b58efe3bffa2d6cd1f28fbf024a0..8494cdda482f857513a4e0c0642c25537cb1d967 100644 (file)
@@ -1,2 +1,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
+
+obj-$(CONFIG_OF_SYSTEM_SETUP) += am625_fdt.o
+obj-$(CONFIG_SPL_BUILD) += am625_init.o
 obj-y += boot.o
similarity index 98%
rename from arch/arm/mach-k3/am625_fdt.c
rename to arch/arm/mach-k3/am62x/am625_fdt.c
index c56adef13bd55c1faf222e323e45897944de020e..8fe200a42318c306fd7ad08a94df3ea1741de636 100644 (file)
@@ -4,9 +4,10 @@
  */
 
 #include <asm/hardware.h>
-#include "common_fdt.h"
 #include <fdt_support.h>
 
+#include "../common_fdt.h"
+
 static void fdt_fixup_cores_nodes_am625(void *blob, int core_nr)
 {
        char node_path[32];
similarity index 99%
rename from arch/arm/mach-k3/am625_init.c
rename to arch/arm/mach-k3/am62x/am625_init.c
index 668f9a51ef4deb2d19cd26d09938165550bcc3bb..ed8d24e04339d4f24c8e8710e92f3d80903f6063 100644 (file)
@@ -9,13 +9,14 @@
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
-#include "sysfw-loader.h"
-#include "common.h"
 #include <dm.h>
 #include <dm/uclass-internal.h>
 #include <dm/pinctrl.h>
 #include <dm/ofnode.h>
 
+#include "../sysfw-loader.h"
+#include "../common.h"
+
 #define RTC_BASE_ADDRESS               0x2b1f0000
 #define REG_K3RTC_S_CNT_LSW            (RTC_BASE_ADDRESS + 0x18)
 #define REG_K3RTC_KICK0                        (RTC_BASE_ADDRESS + 0x70)
index acf09c3426c8b58efe3bffa2d6cd1f28fbf024a0..d0b286276c8d147793f4b4dc4e28612bc4e12494 100644 (file)
@@ -1,2 +1,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
+
+obj-$(CONFIG_SPL_BUILD) += am642_init.o
 obj-y += boot.o
similarity index 99%
rename from arch/arm/mach-k3/am642_init.c
rename to arch/arm/mach-k3/am64x/am642_init.c
index f341b4f367cbac7c508017b149754906d2d83475..41812b7dbf74fa3fc0510911e7a00b57dca63679 100644 (file)
@@ -11,8 +11,6 @@
 #include <spl.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
-#include "sysfw-loader.h"
-#include "common.h"
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <dm.h>
 #include <dm/uclass-internal.h>
@@ -21,6 +19,9 @@
 #include <dm/root.h>
 #include <command.h>
 
+#include "../sysfw-loader.h"
+#include "../common.h"
+
 #define CTRLMMR_MCU_RST_CTRL                   0x04518170
 
 #define CTRLMMR_MCU_RST_SRC                    (MCU_CTRL_MMR0_BASE + 0x18178)
diff --git a/arch/arm/mach-k3/am65x/Makefile b/arch/arm/mach-k3/am65x/Makefile
new file mode 100644 (file)
index 0000000..20d5f1d
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+#      Andrew Davis <afd@ti.com>
+
+obj-$(CONFIG_OF_SYSTEM_SETUP) += am654_fdt.o
+obj-$(CONFIG_SPL_BUILD) += am654_init.o
similarity index 88%
rename from arch/arm/mach-k3/am654_fdt.c
rename to arch/arm/mach-k3/am65x/am654_fdt.c
index 652fe8d32bbb36a23900a980a006dd9a1f786677..bcb15208be921a1633d74e25dbba54fb93ea58eb 100644 (file)
@@ -3,9 +3,10 @@
  * Copyright 2023 Toradex - https://www.toradex.com/
  */
 
-#include "common_fdt.h"
 #include <fdt_support.h>
 
+#include "../common_fdt.h"
+
 int ft_system_setup(void *blob, struct bd_info *bd)
 {
        return fdt_fixup_msmc_ram_k3(blob);
similarity index 99%
rename from arch/arm/mach-k3/am654_init.c
rename to arch/arm/mach-k3/am65x/am654_init.c
index 7c2a143ed1bd07536baa55fecff40a5dfa5de22e..a4f038029d7cc1f085fa97d9c575d65c8f5c6411 100644 (file)
@@ -12,8 +12,6 @@
 #include <asm/io.h>
 #include <spl.h>
 #include <asm/arch/hardware.h>
-#include "sysfw-loader.h"
-#include "common.h"
 #include <dm.h>
 #include <dm/uclass-internal.h>
 #include <dm/pinctrl.h>
@@ -22,6 +20,9 @@
 #include <mmc.h>
 #include <stdlib.h>
 
+#include "../sysfw-loader.h"
+#include "../common.h"
+
 DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef CONFIG_K3_LOAD_SYSFW
diff --git a/arch/arm/mach-k3/j721e/Makefile b/arch/arm/mach-k3/j721e/Makefile
new file mode 100644 (file)
index 0000000..982b88d
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+#      Andrew Davis <afd@ti.com>
+
+obj-$(CONFIG_OF_SYSTEM_SETUP) += j721e_fdt.o
+obj-$(CONFIG_SPL_BUILD) += j721e_init.o
similarity index 88%
rename from arch/arm/mach-k3/j721e_fdt.c
rename to arch/arm/mach-k3/j721e/j721e_fdt.c
index 652fe8d32bbb36a23900a980a006dd9a1f786677..bcb15208be921a1633d74e25dbba54fb93ea58eb 100644 (file)
@@ -3,9 +3,10 @@
  * Copyright 2023 Toradex - https://www.toradex.com/
  */
 
-#include "common_fdt.h"
 #include <fdt_support.h>
 
+#include "../common_fdt.h"
+
 int ft_system_setup(void *blob, struct bd_info *bd)
 {
        return fdt_fixup_msmc_ram_k3(blob);
similarity index 99%
rename from arch/arm/mach-k3/j721e_init.c
rename to arch/arm/mach-k3/j721e/j721e_init.c
index 7ee9b75de4daba7d549bac66d3c218d4e46b4113..c2024f2500dcda1f1fc746a4719607ad1bd50d1e 100644 (file)
@@ -11,8 +11,6 @@
 #include <asm/io.h>
 #include <asm/armv7_mpu.h>
 #include <asm/arch/hardware.h>
-#include "sysfw-loader.h"
-#include "common.h"
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <dm.h>
 #include <dm/uclass-internal.h>
@@ -22,6 +20,9 @@
 #include <mmc.h>
 #include <remoteproc.h>
 
+#include "../sysfw-loader.h"
+#include "../common.h"
+
 #ifdef CONFIG_K3_LOAD_SYSFW
 struct fwl_data cbass_hc_cfg0_fwls[] = {
 #if defined(CONFIG_TARGET_J721E_R5_EVM)
diff --git a/arch/arm/mach-k3/j721s2/Makefile b/arch/arm/mach-k3/j721s2/Makefile
new file mode 100644 (file)
index 0000000..ceef682
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+#      Andrew Davis <afd@ti.com>
+
+obj-$(CONFIG_OF_SYSTEM_SETUP) += j721s2_fdt.o
+obj-$(CONFIG_SPL_BUILD) += j721s2_init.o
similarity index 88%
rename from arch/arm/mach-k3/j721s2_fdt.c
rename to arch/arm/mach-k3/j721s2/j721s2_fdt.c
index 652fe8d32bbb36a23900a980a006dd9a1f786677..bcb15208be921a1633d74e25dbba54fb93ea58eb 100644 (file)
@@ -3,9 +3,10 @@
  * Copyright 2023 Toradex - https://www.toradex.com/
  */
 
-#include "common_fdt.h"
 #include <fdt_support.h>
 
+#include "../common_fdt.h"
+
 int ft_system_setup(void *blob, struct bd_info *bd)
 {
        return fdt_fixup_msmc_ram_k3(blob);
similarity index 99%
rename from arch/arm/mach-k3/j721s2_init.c
rename to arch/arm/mach-k3/j721s2/j721s2_init.c
index 3374889558abadfb5e1d01c811004d7b2355edea..fe9766e9b4b2a6e7e9570197adea1d69dbab2640 100644 (file)
@@ -11,8 +11,6 @@
 #include <asm/io.h>
 #include <asm/armv7_mpu.h>
 #include <asm/arch/hardware.h>
-#include "sysfw-loader.h"
-#include "common.h"
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <dm.h>
 #include <dm/uclass-internal.h>
@@ -21,6 +19,9 @@
 #include <mmc.h>
 #include <remoteproc.h>
 
+#include "../sysfw-loader.h"
+#include "../common.h"
+
 struct fwl_data cbass_hc_cfg0_fwls[] = {
        { "PCIE0_CFG", 2577, 7 },
        { "EMMC8SS0_CFG", 2579, 4 },
diff --git a/arch/arm/mach-k3/j784s4/Makefile b/arch/arm/mach-k3/j784s4/Makefile
new file mode 100644 (file)
index 0000000..6d1841e
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+#      Andrew Davis <afd@ti.com>
+
+obj-$(CONFIG_OF_SYSTEM_SETUP) += j784s4_fdt.o
+obj-$(CONFIG_SPL_BUILD) += j784s4_init.o
similarity index 92%
rename from arch/arm/mach-k3/j784s4_fdt.c
rename to arch/arm/mach-k3/j784s4/j784s4_fdt.c
index d05ed8b99110f79e0bcab97617353943c24556b8..e127509705143ac93e9d26a7efc91aec55b81230 100644 (file)
@@ -6,9 +6,10 @@
  *     Apurva Nandan <a-nandan@ti.com>
  */
 
-#include "common_fdt.h"
 #include <fdt_support.h>
 
+#include "../common_fdt.h"
+
 int ft_system_setup(void *blob, struct bd_info *bd)
 {
        return fdt_fixup_msmc_ram_k3(blob);
similarity index 99%
rename from arch/arm/mach-k3/j784s4_init.c
rename to arch/arm/mach-k3/j784s4/j784s4_init.c
index ae4420362d099f6c1df410037eb71060224f8681..1ce13e0f4942dbca52cacd65c0c27a0800bfe362 100644 (file)
@@ -11,8 +11,6 @@
 #include <asm/io.h>
 #include <asm/armv7_mpu.h>
 #include <asm/arch/hardware.h>
-#include "sysfw-loader.h"
-#include "common.h"
 #include <linux/soc/ti/ti_sci_protocol.h>
 #include <dm.h>
 #include <dm/uclass-internal.h>
@@ -20,6 +18,9 @@
 #include <mmc.h>
 #include <remoteproc.h>
 
+#include "../sysfw-loader.h"
+#include "../common.h"
+
 #define J784S4_MAX_DDR_CONTROLLERS     4
 
 struct fwl_data infra_cbass0_fwls[] = {