Compile ALTERA_SDRAM driver in SPL only. Rename ALTERA_SDRAM to SPL_ALTERA_SDRAM.
Signed-off-by: Ley Foon Tan <ley.foon....@intel.com> --- 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 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 66a09ac900..53c7709d22 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 5e87371f8c..d4d878d3be 100644 --- a/arch/arm/mach-socfpga/Kconfig +++ b/arch/arm/mach-socfpga/Kconfig @@ -9,7 +9,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 @@ -28,7 +28,7 @@ config TARGET_SOCFPGA_CYCLONE5 config TARGET_SOCFPGA_GEN5 bool - select ALTERA_SDRAM + select SPL_ALTERA_SDRAM config TARGET_SOCFPGA_STRATIX10 bool 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 <tho...@wytron.com.tw> # Copyright (C) 2014 Altera Corporation <www.altera.com> -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 31c267f55d..9d1bc8e8d5 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 -- 2.19.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot