All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amjad Ouled-Ameur <aouledameur@baylibre.com>
To: u-boot@lists.denx.de
Cc: khilman@baylibre.com, Keerthy <j-keerthy@ti.com>,
	Amjad Ouled-Ameur <aouledameur@baylibre.com>,
	"Andrew F. Davis" <afd@ti.com>, Asherah Connor <ashe@kivikakk.ee>,
	Bin Meng <bmeng.cn@gmail.com>,
	Igor Opaniuk <igor.opaniuk@foundries.io>,
	Michael Scott <mike@foundries.io>, Peng Fan <peng.fan@nxp.com>,
	Simon Glass <sjg@chromium.org>, Wasim Khan <wasim.khan@nxp.com>,
	Ye Li <ye.li@nxp.com>
Subject: [PATCH v3 04/11] drivers: misc: Makefile: Enable fs_loader compilation at SPL Level
Date: Tue, 18 Jan 2022 11:12:42 +0100	[thread overview]
Message-ID: <20220118101249.87031-5-aouledameur@baylibre.com> (raw)
In-Reply-To: <20220118101249.87031-1-aouledameur@baylibre.com>

From: Keerthy <j-keerthy@ti.com>

Enable fs_loader compilation at SPL Level.

Signed-off-by: Keerthy <j-keerthy@ti.com>
[Amjad: fix compilation failures for J721e platform]
Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
---

(no changes since v1)

 arch/arm/mach-k3/common.c         | 10 +++-------
 configs/j721e_evm_r5_defconfig    |  1 +
 configs/j721e_hs_evm_r5_defconfig |  1 +
 drivers/misc/Kconfig              |  9 +++++++++
 drivers/misc/Makefile             |  2 +-
 5 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 39d00270b7fa..b4b75f4e6c86 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/j721e_evm_r5_defconfig b/configs/j721e_evm_r5_defconfig
index b0759d1f305d..1fb13a8a707d 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 3d2bbb4844e8..1e4a93ff53fe 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/drivers/misc/Kconfig b/drivers/misc/Kconfig
index a8baaeaf5cfe..0ade3e32b0ef 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 f9826d2462d1..bca7b24e99ad 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.25.1


  parent reply	other threads:[~2022-01-18 10:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 10:12 [PATCH v3 00/11] dra7: bring up and support IPU load/start Amjad Ouled-Ameur
2022-01-18 10:12 ` [PATCH v3 01/11] configs: dra7xx_evm: Increase the size of SPL_MULTI_DTB_FIT Amjad Ouled-Ameur
2022-01-18 10:12 ` [PATCH v3 02/11] reset: dra7: Add a reset driver Amjad Ouled-Ameur
2022-01-18 10:12 ` [PATCH v3 03/11] arm: mach-omap2: load/start remoteproc IPU1/IPU2 Amjad Ouled-Ameur
2022-01-18 10:12 ` Amjad Ouled-Ameur [this message]
2022-01-26  3:37   ` [PATCH v3 04/11] drivers: misc: Makefile: Enable fs_loader compilation at SPL Level Tom Rini
2022-01-27 12:18     ` Amjad Ouled-Ameur
2022-01-18 10:12 ` [PATCH v3 05/11] linux: bitmap.h: Add find_next_zero_area function Amjad Ouled-Ameur
2022-01-18 10:12 ` [PATCH v3 06/11] remoteproc: uclass: Add remoteproc resource handling helpers Amjad Ouled-Ameur
2022-01-27 15:05   ` Simon Glass
2022-01-18 10:12 ` [PATCH v3 07/11] remoteproc: ipu: Add driver to bring up ipu Amjad Ouled-Ameur
2022-01-18 10:12 ` [PATCH v3 08/11] dts: dra7-ipu-common-early-boot.dtsi: Add all the ipu early boot related nodes Amjad Ouled-Ameur
2022-01-18 10:12 ` [PATCH v3 09/11] arm: dts: dra7: Add ipu and " Amjad Ouled-Ameur
2022-01-18 10:12 ` [PATCH v3 10/11] arm: dts: dra7*/am57xx-idk-evm-u-boot: Add ipu early boot DT changes Amjad Ouled-Ameur
2022-01-18 10:12 ` [PATCH v3 11/11] dts: am57xx*: " Amjad Ouled-Ameur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220118101249.87031-5-aouledameur@baylibre.com \
    --to=aouledameur@baylibre.com \
    --cc=afd@ti.com \
    --cc=ashe@kivikakk.ee \
    --cc=bmeng.cn@gmail.com \
    --cc=igor.opaniuk@foundries.io \
    --cc=j-keerthy@ti.com \
    --cc=khilman@baylibre.com \
    --cc=mike@foundries.io \
    --cc=peng.fan@nxp.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=wasim.khan@nxp.com \
    --cc=ye.li@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.