]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: Move sysfw-loader into R5 directory
authorAndrew Davis <afd@ti.com>
Tue, 14 Nov 2023 15:59:50 +0000 (09:59 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 22 Nov 2023 17:04:14 +0000 (12:04 -0500)
SYSFW is only ever loaded by the R5 core, move the code into that
directory. While here also move the related Kconfig symbols.

Signed-off-by: Andrew Davis <afd@ti.com>
arch/arm/mach-k3/Kconfig
arch/arm/mach-k3/Makefile
arch/arm/mach-k3/r5/Kconfig [new file with mode: 0644]
arch/arm/mach-k3/r5/Makefile
arch/arm/mach-k3/r5/sysfw-loader.c [moved from arch/arm/mach-k3/sysfw-loader.c with 99% similarity]

index 6ed0719b0c156f0e0b1ce7beb94e1b3308708230..c95a41959a23525325e6a9a001870b7d238cbac6 100644 (file)
@@ -109,53 +109,6 @@ config K3_EARLY_CONS_IDX
          Use this option to set the index of the serial device to be used
          for the early console during SPL execution.
 
-config K3_LOAD_SYSFW
-       bool
-       depends on CPU_V7R
-
-config K3_SYSFW_IMAGE_NAME
-       string "File name of SYSFW firmware and configuration blob"
-       depends on K3_LOAD_SYSFW
-       default "sysfw.itb"
-       help
-         Filename of the combined System Firmware and configuration image tree
-         blob to be loaded when booting from a filesystem.
-
-config K3_SYSFW_IMAGE_MMCSD_RAW_MODE_SECT
-       hex "MMC sector to load SYSFW firmware and configuration blob from"
-       depends on K3_LOAD_SYSFW && SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
-       default 0x3600
-       help
-         Address on the MMC to load the combined System Firmware and
-         configuration image tree blob from, when the MMC is being used
-         in raw mode. Units: MMC sectors (1 sector = 512 bytes).
-
-config K3_SYSFW_IMAGE_MMCSD_RAW_MODE_PART
-       hex "MMC partition to load SYSFW firmware and configuration blob from"
-       depends on K3_LOAD_SYSFW && SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
-       default 2
-       help
-         Partition on the MMC to the combined System Firmware and configuration
-         image tree blob from, when the MMC is being used in raw mode.
-
-config K3_SYSFW_IMAGE_SIZE_MAX
-       int "Amount of memory dynamically allocated for loading SYSFW blob"
-       depends on K3_LOAD_SYSFW
-       default 280000
-       help
-         Amount of memory (in bytes) reserved through dynamic allocation at
-         runtime for loading the combined System Firmware and configuration image
-         tree blob. Keep it as tight as possible, as this directly affects the
-         overall SPL memory footprint.
-
-config K3_SYSFW_IMAGE_SPI_OFFS
-       hex "SPI offset of SYSFW firmware and configuration blob"
-       depends on K3_LOAD_SYSFW
-       default 0x6C0000
-       help
-         Offset of the combined System Firmware and configuration image tree
-         blob to be loaded when booting from a SPI flash memory.
-
 config SYS_K3_SPL_ATF
        bool "Start Cortex-A from SPL"
        depends on CPU_V7R
@@ -187,6 +140,10 @@ config K3_X509_SWRV
        help
          SWRV for X509 certificate used for boot images
 
+if CPU_V7R
+source "arch/arm/mach-k3/r5/Kconfig"
+endif
+
 source "arch/arm/mach-k3/am65x/Kconfig"
 source "arch/arm/mach-k3/am64x/Kconfig"
 source "arch/arm/mach-k3/am62x/Kconfig"
index 215c755c5dcf859fd25a5f532264fc4610a7c18b..42161376469e2ee5455111cf25a550f1eea87217 100644 (file)
@@ -20,6 +20,5 @@ 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_K3_LOAD_SYSFW) += sysfw-loader.o
 endif
 obj-y += common.o security.o
diff --git a/arch/arm/mach-k3/r5/Kconfig b/arch/arm/mach-k3/r5/Kconfig
new file mode 100644 (file)
index 0000000..ae79f8f
--- /dev/null
@@ -0,0 +1,45 @@
+config K3_LOAD_SYSFW
+       bool
+
+config K3_SYSFW_IMAGE_NAME
+       string "File name of SYSFW firmware and configuration blob"
+       depends on K3_LOAD_SYSFW
+       default "sysfw.itb"
+       help
+         Filename of the combined System Firmware and configuration image tree
+         blob to be loaded when booting from a filesystem.
+
+config K3_SYSFW_IMAGE_MMCSD_RAW_MODE_SECT
+       hex "MMC sector to load SYSFW firmware and configuration blob from"
+       depends on K3_LOAD_SYSFW && SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
+       default 0x3600
+       help
+         Address on the MMC to load the combined System Firmware and
+         configuration image tree blob from, when the MMC is being used
+         in raw mode. Units: MMC sectors (1 sector = 512 bytes).
+
+config K3_SYSFW_IMAGE_MMCSD_RAW_MODE_PART
+       hex "MMC partition to load SYSFW firmware and configuration blob from"
+       depends on K3_LOAD_SYSFW && SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
+       default 2
+       help
+         Partition on the MMC to the combined System Firmware and configuration
+         image tree blob from, when the MMC is being used in raw mode.
+
+config K3_SYSFW_IMAGE_SIZE_MAX
+       int "Amount of memory dynamically allocated for loading SYSFW blob"
+       depends on K3_LOAD_SYSFW
+       default 280000
+       help
+         Amount of memory (in bytes) reserved through dynamic allocation at
+         runtime for loading the combined System Firmware and configuration image
+         tree blob. Keep it as tight as possible, as this directly affects the
+         overall SPL memory footprint.
+
+config K3_SYSFW_IMAGE_SPI_OFFS
+       hex "SPI offset of SYSFW firmware and configuration blob"
+       depends on K3_LOAD_SYSFW
+       default 0x6C0000
+       help
+         Offset of the combined System Firmware and configuration image tree
+         blob to be loaded when booting from a SPI flash memory.
index 8a6af73a44e114d14fa9055b388b075a86fa25d7..b99199d3374111017448bb33859862aa0f57878c 100644 (file)
@@ -11,3 +11,7 @@ obj-$(CONFIG_SOC_K3_AM62A7) += am62ax/
 
 obj-y += lowlevel_init.o
 obj-y += r5_mpu.o
+
+ifeq ($(CONFIG_SPL_BUILD),y)
+obj-$(CONFIG_K3_LOAD_SYSFW) += sysfw-loader.o
+endif
similarity index 99%
rename from arch/arm/mach-k3/sysfw-loader.c
rename to arch/arm/mach-k3/r5/sysfw-loader.c
index 49a82c7edc764ca19a40e600f0afe17192cfb4a5..94d051ba0fbb2ccff0fc38f1460525a8d35e8df2 100644 (file)
@@ -22,7 +22,7 @@
 #include <spi_flash.h>
 
 #include <asm/io.h>
-#include "common.h"
+#include "../common.h"
 
 DECLARE_GLOBAL_DATA_PTR;