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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8AB2EECAAD5 for ; Mon, 5 Sep 2022 14:11:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D29D284870; Mon, 5 Sep 2022 16:11:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.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=intel.com header.i=@intel.com header.b="V1ODx6Jr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AEF2284934; Mon, 5 Sep 2022 16:11:25 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A811984870 for ; Mon, 5 Sep 2022 16:11:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662387082; x=1693923082; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=pOdpskcB77JDPDwslZhUm2+MJR6UUPhnpxcwscj3k54=; b=V1ODx6JrvdAirnyF7C+7xIf/r2MaKfUi7rj++TIUi424u7C3qSwjLUZw WXE/0aUjH23RkFlrSiCFxpoCmInuNdDWO/pLXd0zv8n0/pi4v9Xcj3EQ9 Hq/Y22UG/RmVyzEd0WaCrNlc4mJrgv0ANhzqqjF8tFGmU0VkrH4U8wGsd jcjKI7lgMJbHfA1w2Fs1aqDbE+wi/149QJa3e02h6eF/5bxOvzLUhz2cx 7HDJDLUsuSV+P5uHcgDi86gqqCKFaYdLT/nyML1hCXtexgis7LacCCn8c S5ybO9r4UHtH0cImDFrFEoa6zQVhUjp6MMxXwxmSioGSZPGr2l8I+V5to A==; X-IronPort-AV: E=McAfee;i="6500,9779,10461"; a="358113543" X-IronPort-AV: E=Sophos;i="5.93,291,1654585200"; d="scan'208";a="358113543" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 07:11:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,291,1654585200"; d="scan'208";a="675305628" Received: from pglmail07.png.intel.com ([10.221.193.207]) by fmsmga008.fm.intel.com with ESMTP; 05 Sep 2022 07:11:16 -0700 Received: from localhost (pgli0117.png.intel.com [10.221.240.80]) by pglmail07.png.intel.com (Postfix) with ESMTP id 32C1C32EB; Mon, 5 Sep 2022 22:11:16 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 2E8073D4F; Mon, 5 Sep 2022 22:11:16 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Sieu Mun Tang , Jit Loon Lim Subject: [PATCH] mtd: nand: Allow full NAND framework in SPL Date: Mon, 5 Sep 2022 22:11:14 +0800 Message-Id: <20220905141114.16425-1-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean From: Tien Fong Chee Add configuration option to compile the entire NAND framework into U-Boot SPL. This is required by some drivers, like the Denali NAND, which use a lot of functionality from the NAND core. Signed-off-by: Marek Vasut Signed-off-by: Tien Fong Chee Signed-off-by: Jit Loon Lim --- drivers/mtd/nand/raw/Kconfig | 7 +++++++ drivers/mtd/nand/raw/Makefile | 16 +++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index ce67d1abde..a3bd45f24e 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -694,4 +694,11 @@ config SPL_NAND_SIMPLE expose the cmd_ctrl() interface. endif +config SPL_NAND_FRAMEWORK + bool "Compile the entire NAND framework into the SPL" + help + Some drivers require a lot of functionality from the NAND framework + core when used in SPL. This option allows compiling the full NAND + framework into the SPL instead of it's reduced version. + endif # if NAND diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile index a398aa9d88..e0f7045fec 100644 --- a/drivers/mtd/nand/raw/Makefile +++ b/drivers/mtd/nand/raw/Makefile @@ -3,8 +3,16 @@ # (C) Copyright 2006 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. +nand-framework-objs := nand.o nand_bbt.o nand_ids.o nand_util.o \ + nand_ecc.o nand_base.o nand_timings.o + ifdef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_NAND_FRAMEWORK +obj-y += $(nand-framework-objs) +NORMAL_DRIVERS=y +endif + ifdef CONFIG_SPL_NAND_DRIVERS NORMAL_DRIVERS=y endif @@ -27,19 +35,13 @@ else # not spl NORMAL_DRIVERS=y -obj-y += nand.o -obj-y += nand_bbt.o -obj-y += nand_ids.o -obj-y += nand_util.o -obj-y += nand_ecc.o -obj-y += nand_base.o obj-y += nand_amd.o obj-y += nand_hynix.o obj-y += nand_macronix.o obj-y += nand_micron.o obj-y += nand_samsung.o obj-y += nand_toshiba.o -obj-y += nand_timings.o +obj-y += $(nand-framework-objs) endif # not spl -- 2.26.2