From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FE60C433EF for ; Thu, 30 Sep 2021 16:22:14 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36E0F613CE for ; Thu, 30 Sep 2021 16:22:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 36E0F613CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E775881918; Thu, 30 Sep 2021 18:22:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="yL3ItcaY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9E15D81F0C; Thu, 30 Sep 2021 18:21:43 +0200 (CEST) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DC309811CF for ; Thu, 30 Sep 2021 18:21:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=aouledameur@baylibre.com Received: by mail-wm1-x32f.google.com with SMTP id f78-20020a1c1f51000000b0030cdb3d6079so4754678wmf.3 for ; Thu, 30 Sep 2021 09:21:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B6cQMwxh828qYo9TT05W749fLT3EYpC07QwvDvkVePs=; b=yL3ItcaY4MJZf+Hf+0DQ2BNqi9jN5Uhik/QOs3oES67lVHYUeaIpWoolXpmRniKFWm 2MBcBvU4W3k0boMhw4/B1baj1hqJGi5gQGZSnd0b14hulEcKpYG2eP4wbog/5GC34AD7 SW8JI4GPCyx6g57RwhqnTmVFGc4CpjuGfKo2JUiUI/KAf42YymiDuzZ3UjQhfuxG7uQc Yekz5gWGt8En0u0LG3BpXmqteUY0kPXLL1YOvj8WAUk347bbRFKMS2ggnSm+Pd/Cv6mI QEXeDysUM2kC4VR8u2QM4nPHX2agP0bL6K5wObMnzxSZRgwqP4qoacsM+1zg/pvKUCMQ SUCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B6cQMwxh828qYo9TT05W749fLT3EYpC07QwvDvkVePs=; b=PCKsMuQbvaQVraBbEAXzhNFe1/mlGctdp/DPMUM7SnkGCStvMUc8Dw3SUpTh9Z0buy 9twbUuZEVdBhQXJVfsbr4f36QpIY2MUZ0TB/oMkUihhEbxmAsWlZbk9kFgiTqYC1xwM8 VSHRdEcDaOxbyiBaPM5P/HPbuNU9LMi135MHKhmaU9qg/YSo4jw7hbJ7waL8VQLtOTWz czHiYCQFUHOvqv5HAlXJQbkLxzuhSOh2ZSxl1seLHAzNLqbver1GJhBLLJuFGfcMKVxV +mLHTxY9RgIxY2gI77jAG+wCidqqs9UWgcrUWir2C9pxjHEoiRr+GEeziBiZqHUyZgDU SfTA== X-Gm-Message-State: AOAM53295BXGCTIKr1z2KSKxz02m1my5Au3gbuBwVSyhlt2KMz/1zLPA 7KYkvXzEA/CQCH7m7XVN9USAlR6XQQG73fGa X-Google-Smtp-Source: ABdhPJxujKRYy0crA2cEQ3dEamAQFMk345uXYH3k4ePRPkD7+TkH2AIw2nZrJpt4BNaWXsG5fcCTww== X-Received: by 2002:a1c:f00a:: with SMTP id a10mr31856wmb.112.1633018892478; Thu, 30 Sep 2021 09:21:32 -0700 (PDT) Received: from localhost.localdomain (203.247.120.78.rev.sfr.net. [78.120.247.203]) by smtp.googlemail.com with ESMTPSA id s13sm1846393wrv.97.2021.09.30.09.21.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 09:21:32 -0700 (PDT) From: Amjad Ouled-Ameur To: u-boot@lists.denx.de Cc: khilman@baylibre.com, Keerthy , Amjad Ouled-Ameur , "Andrew F. Davis" , Asherah Connor , Aswath Govindraju , Bin Meng , Faiz Abbas , Heiko Schocher , Igor Opaniuk , Michal Simek , Simon Glass , Suman Anna , Tero Kristo , Wasim Khan , Ye Li Subject: [PATCH v2 03/10] drivers: misc: Makefile: Enable fs_loader compilation at SPL Level Date: Thu, 30 Sep 2021 18:21:04 +0200 Message-Id: <20210930162111.37566-4-aouledameur@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210930162111.37566-1-aouledameur@baylibre.com> References: <20210930162111.37566-1-aouledameur@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Keerthy Enable fs_loader compilation at SPL Level. Signed-off-by: Keerthy [Amjad: fix compilation failures for J721e platform] Signed-off-by: Amjad Ouled-Ameur --- (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 2666cd2d7b17..dddad8e3b056 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 b5fd3bf23734..edc003f46b90 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 3a8e0b1cd15b..6c3675c1726c 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 997b71322110..e6a1dc677d6e 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -468,6 +468,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 b64cd2a4de91..c7c95ee76767 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