arm: socfpga: Enable SPL MMC/SPI support only if DM_MMC/SPI is enabled
authorMarek Vasut <marex@denx.de>
Sun, 20 Dec 2015 03:00:44 +0000 (04:00 +0100)
committerMarek Vasut <marex@denx.de>
Tue, 22 Dec 2015 20:30:02 +0000 (21:30 +0100)
It is not possible to compile MMC/SPI SPL if the respective DM_MMC/DM_SPI
bits are not enabled. Secure the code with an ifdef to prevent compiler
splat.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Chin Liang See <clsee@altera.com>
include/configs/socfpga_common.h

index 35e4a75c3f93e23a0a99893f27fd348ff5cf7bd1..ff7a3005a582e423f1f9a33d3ace96efbb499350 100644 (file)
@@ -330,8 +330,12 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 #define CONFIG_SPL_LIBGENERIC_SUPPORT
 #define CONFIG_SPL_WATCHDOG_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
+#ifdef CONFIG_DM_MMC
 #define CONFIG_SPL_MMC_SUPPORT
+#endif
+#ifdef CONFIG_DM_SPI
 #define CONFIG_SPL_SPI_SUPPORT
+#endif
 
 /* SPL SDMMC boot support */
 #ifdef CONFIG_SPL_MMC_SUPPORT