From patchwork Mon May 6 01:55:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ley Foon Tan X-Patchwork-Id: 1095662 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44y5T60GWBz9s9N for ; Mon, 6 May 2019 11:56:57 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B7110C21DEC; Mon, 6 May 2019 01:56:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B7A23C21DC1; Mon, 6 May 2019 01:56:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DD4DFC21DE8; Mon, 6 May 2019 01:56:18 +0000 (UTC) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lists.denx.de (Postfix) with ESMTPS id 424DCC21D74 for ; Mon, 6 May 2019 01:56:14 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 May 2019 18:56:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,435,1549958400"; d="scan'208";a="148867929" Received: from lftan-mobl.gar.corp.intel.com (HELO ubuntu) ([10.226.248.82]) by fmsmga007.fm.intel.com with SMTP; 05 May 2019 18:56:09 -0700 Received: by ubuntu (sSMTP sendmail emulation); Mon, 06 May 2019 09:56:06 +0800 From: Ley Foon Tan To: u-boot@lists.denx.de, Marek Vasut Date: Mon, 6 May 2019 09:55:59 +0800 Message-Id: <1557107761-33741-2-git-send-email-ley.foon.tan@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557107761-33741-1-git-send-email-ley.foon.tan@intel.com> References: <1557107761-33741-1-git-send-email-ley.foon.tan@intel.com> Cc: Chin Liang See , Dalon Westergreen Subject: [U-Boot] [PATCH v5 1/3] ddr: altera: Compile ALTERA SDRAM in SPL only X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Compile ALTERA_SDRAM driver in SPL only. Rename ALTERA_SDRAM to SPL_ALTERA_SDRAM. Signed-off-by: Ley Foon Tan --- Makefile | 2 +- arch/arm/mach-socfpga/Kconfig | 4 ++-- drivers/Makefile | 2 +- drivers/ddr/altera/Kconfig | 5 +++-- drivers/ddr/altera/Makefile | 2 +- include/configs/socfpga_stratix10_socdk.h | 2 +- scripts/config_whitelist.txt | 1 + 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index d6a6ef19ab..5ae5db591f 100644 --- a/Makefile +++ b/Makefile @@ -713,7 +713,7 @@ libs-y += drivers/spi/ libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/ libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ libs-$(CONFIG_SYS_FSL_MMDC) += drivers/ddr/fsl/ -libs-$(CONFIG_ALTERA_SDRAM) += drivers/ddr/altera/ +libs-$(CONFIG_$(SPL_)ALTERA_SDRAM) += drivers/ddr/altera/ libs-y += drivers/serial/ libs-y += drivers/usb/dwc3/ libs-y += drivers/usb/common/ diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig index 8f7b79f586..ea316d09d7 100644 --- a/arch/arm/mach-socfpga/Kconfig +++ b/arch/arm/mach-socfpga/Kconfig @@ -26,7 +26,7 @@ config TARGET_SOCFPGA_ARRIA5 config TARGET_SOCFPGA_ARRIA10 bool - select ALTERA_SDRAM + select SPL_ALTERA_SDRAM select SPL_BOARD_INIT if SPL select CLK select SPL_CLK if SPL @@ -47,7 +47,7 @@ config TARGET_SOCFPGA_CYCLONE5 config TARGET_SOCFPGA_GEN5 bool - select ALTERA_SDRAM + select SPL_ALTERA_SDRAM imply FPGA_SOCFPGA imply SPL_STACK_R imply SPL_SYS_MALLOC_SIMPLE diff --git a/drivers/Makefile b/drivers/Makefile index a7bba3ed56..e501ae8d04 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -34,7 +34,7 @@ obj-$(CONFIG_SPL_CRYPTO_SUPPORT) += crypto/ obj-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/fsl/ obj-$(CONFIG_ARMADA_38X) += ddr/marvell/a38x/ obj-$(CONFIG_ARMADA_XP) += ddr/marvell/axp/ -obj-$(CONFIG_ALTERA_SDRAM) += ddr/altera/ +obj-$(CONFIG_$(SPL_)ALTERA_SDRAM) += ddr/altera/ obj-$(CONFIG_ARCH_IMX8M) += ddr/imx/imx8m/ obj-$(CONFIG_SPL_POWER_SUPPORT) += power/ power/pmic/ obj-$(CONFIG_SPL_POWER_SUPPORT) += power/regulator/ diff --git a/drivers/ddr/altera/Kconfig b/drivers/ddr/altera/Kconfig index 8f60b56eb8..83c1ab5e07 100644 --- a/drivers/ddr/altera/Kconfig +++ b/drivers/ddr/altera/Kconfig @@ -1,5 +1,6 @@ -config ALTERA_SDRAM - bool "SoCFPGA DDR SDRAM driver" +config SPL_ALTERA_SDRAM + bool "SoCFPGA DDR SDRAM driver in SPL" + depends on SPL depends on TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10 select RAM if TARGET_SOCFPGA_GEN5 select SPL_RAM if TARGET_SOCFPGA_GEN5 diff --git a/drivers/ddr/altera/Makefile b/drivers/ddr/altera/Makefile index 3615b617ec..341ac0d73b 100644 --- a/drivers/ddr/altera/Makefile +++ b/drivers/ddr/altera/Makefile @@ -6,7 +6,7 @@ # (C) Copyright 2010, Thomas Chou # Copyright (C) 2014 Altera Corporation -ifdef CONFIG_ALTERA_SDRAM +ifdef CONFIG_$(SPL_)ALTERA_SDRAM obj-$(CONFIG_TARGET_SOCFPGA_GEN5) += sdram_gen5.o sequencer.o obj-$(CONFIG_TARGET_SOCFPGA_ARRIA10) += sdram_arria10.o obj-$(CONFIG_TARGET_SOCFPGA_STRATIX10) += sdram_s10.o diff --git a/include/configs/socfpga_stratix10_socdk.h b/include/configs/socfpga_stratix10_socdk.h index 12e77c0a90..b8a86f2cb2 100644 --- a/include/configs/socfpga_stratix10_socdk.h +++ b/include/configs/socfpga_stratix10_socdk.h @@ -132,7 +132,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void); /* * SDRAM controller */ -#define CONFIG_ALTERA_SDRAM +#define CONFIG_SPL_ALTERA_SDRAM /* * Serial / UART configurations diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index bc86b848a2..4610553815 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1824,6 +1824,7 @@ CONFIG_SPLASH_SCREEN_ALIGN CONFIG_SPLASH_SOURCE CONFIG_SPLL_FREQ CONFIG_SPL_ +CONFIG_SPL_ALTERA_SDRAM CONFIG_SPL_ATMEL_SIZE CONFIG_SPL_BOARD_LOAD_IMAGE CONFIG_SPL_BOOTROM_SAVE