From b071a07743d44e58046ee5f52df9b6fab7733654 Mon Sep 17 00:00:00 2001 From: Keerthy Date: Thu, 27 Jan 2022 13:16:53 +0100 Subject: [PATCH] drivers: misc: Makefile: Enable fs_loader compilation at SPL Level Enable fs_loader compilation at SPL Level. Signed-off-by: Keerthy [Amjad: fix compilation failures for J721e platform] Signed-off-by: Amjad Ouled-Ameur --- arch/arm/mach-k3/common.c | 10 +++------- configs/j7200_evm_r5_defconfig | 1 + configs/j721e_evm_r5_defconfig | 1 + configs/j721e_hs_evm_r5_defconfig | 1 + configs/j721s2_evm_r5_defconfig | 1 + configs/socfpga_arria10_defconfig | 1 + drivers/misc/Kconfig | 9 +++++++++ drivers/misc/Makefile | 2 +- 8 files changed, 18 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index 39d00270b7..b4b75f4e6c 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -156,13 +156,15 @@ void init_env(void) #endif } -#ifdef CONFIG_FS_LOADER int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr) { struct udevice *fsdev; char *name = NULL; int size = 0; + if (!IS_ENABLED(CONFIG_FS_LOADER)) + return 0; + *loadaddr = 0; #ifdef CONFIG_SPL_ENV_SUPPORT switch (spl_boot_device()) { @@ -186,12 +188,6 @@ int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr) return size; } -#else -int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr) -{ - return 0; -} -#endif __weak void release_resources_for_core_shutdown(void) { diff --git a/configs/j7200_evm_r5_defconfig b/configs/j7200_evm_r5_defconfig index 1ff5cc91ca..e500a27bb6 100644 --- a/configs/j7200_evm_r5_defconfig +++ b/configs/j7200_evm_r5_defconfig @@ -91,6 +91,7 @@ CONFIG_SYS_I2C_OMAP24XX=y CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y CONFIG_FS_LOADER=y +CONFIG_SPL_FS_LOADER=y CONFIG_K3_AVS0=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_SPL_MMC_HS400_SUPPORT=y diff --git a/configs/j721e_evm_r5_defconfig b/configs/j721e_evm_r5_defconfig index b0759d1f30..1fb13a8a70 100644 --- a/configs/j721e_evm_r5_defconfig +++ b/configs/j721e_evm_r5_defconfig @@ -88,6 +88,7 @@ CONFIG_SYS_I2C_OMAP24XX=y CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y CONFIG_FS_LOADER=y +CONFIG_SPL_FS_LOADER=y CONFIG_ESM_K3=y CONFIG_K3_AVS0=y CONFIG_ESM_PMIC=y diff --git a/configs/j721e_hs_evm_r5_defconfig b/configs/j721e_hs_evm_r5_defconfig index 3d2bbb4844..1e4a93ff53 100644 --- a/configs/j721e_hs_evm_r5_defconfig +++ b/configs/j721e_hs_evm_r5_defconfig @@ -82,6 +82,7 @@ CONFIG_SYS_I2C_OMAP24XX=y CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y CONFIG_FS_LOADER=y +CONFIG_SPL_FS_LOADER=y CONFIG_K3_AVS0=y CONFIG_MMC_SDHCI=y CONFIG_SPL_MMC_SDHCI_ADMA=y diff --git a/configs/j721s2_evm_r5_defconfig b/configs/j721s2_evm_r5_defconfig index 4ecab60535..f587ec7d29 100644 --- a/configs/j721s2_evm_r5_defconfig +++ b/configs/j721s2_evm_r5_defconfig @@ -90,6 +90,7 @@ CONFIG_SYS_I2C_OMAP24XX=y CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y CONFIG_FS_LOADER=y +CONFIG_SPL_FS_LOADER=y CONFIG_DM_MMC=y CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_SPL_MMC_HS400_SUPPORT=y diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig index cd1c68a3b6..ad1bdbe9bc 100644 --- a/configs/socfpga_arria10_defconfig +++ b/configs/socfpga_arria10_defconfig @@ -41,6 +41,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DWAPB_GPIO=y CONFIG_FS_LOADER=y +CONFIG_SPL_FS_LOADER=y CONFIG_MMC_DW=y CONFIG_MTD=y CONFIG_PHY_MICREL=y diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index a8baaeaf5c..0ade3e32b0 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -453,6 +453,15 @@ config FS_LOADER The consumer driver would then use this loader to program whatever, ie. the FPGA device. +config SPL_FS_LOADER + bool "Enable loader driver for file system" + help + This is file system generic loader which can be used to load + the file image from the storage into target such as memory. + + The consumer driver would then use this loader to program whatever, + ie. the FPGA device. + config GDSYS_SOC bool "Enable gdsys SOC driver" depends on MISC diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index f9826d2462..bca7b24e99 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -37,7 +37,7 @@ obj-$(CONFIG_FSL_IFC) += fsl_ifc.o obj-$(CONFIG_FSL_IIM) += fsl_iim.o obj-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o obj-$(CONFIG_FSL_SEC_MON) += fsl_sec_mon.o -obj-$(CONFIG_FS_LOADER) += fs_loader.o +obj-$(CONFIG_$(SPL_)FS_LOADER) += fs_loader.o obj-$(CONFIG_GDSYS_IOEP) += gdsys_ioep.o obj-$(CONFIG_GDSYS_RXAUI_CTRL) += gdsys_rxaui_ctrl.o obj-$(CONFIG_GDSYS_SOC) += gdsys_soc.o -- 2.39.5