From 5f09eae7a16d95857225b9fc7da948ee80fd27e6 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 20 Nov 2018 10:56:37 -0600 Subject: [PATCH] kconfig: Hide the DesignWare SPI driver on unsupported platforms When users are configuring applications they are given the option to enable the DesignWare SPI driver. But they should not be given this option on SoCs that don't have the DesignWare SPI HW. This commit hides the driver by default by introducing the config option HAS_SPI_DW. Fixes: #10825 Signed-off-by: Kumar Gala --- drivers/spi/Kconfig.dw | 6 ++++++ soc/arc/quark_se_c1000_ss/Kconfig.soc | 1 + soc/arc/snps_emsk/Kconfig.soc | 1 + soc/x86/intel_quark/quark_d2000/Kconfig.soc | 1 + soc/x86/intel_quark/quark_se/Kconfig.soc | 2 ++ soc/xtensa/intel_s1000/Kconfig.soc | 1 + 6 files changed, 12 insertions(+) diff --git a/drivers/spi/Kconfig.dw b/drivers/spi/Kconfig.dw index f777605d938..1ad89200a08 100644 --- a/drivers/spi/Kconfig.dw +++ b/drivers/spi/Kconfig.dw @@ -6,8 +6,14 @@ # SPDX-License-Identifier: Apache-2.0 # +config HAS_SPI_DW + bool + help + Signifies whether DesignWare SPI compatible HW is available + menuconfig SPI_DW bool "Designware SPI controller driver" + depends on HAS_SPI_DW help Enable support for Designware's SPI controllers. diff --git a/soc/arc/quark_se_c1000_ss/Kconfig.soc b/soc/arc/quark_se_c1000_ss/Kconfig.soc index 08747bea9f8..1f5b62ab9a7 100644 --- a/soc/arc/quark_se_c1000_ss/Kconfig.soc +++ b/soc/arc/quark_se_c1000_ss/Kconfig.soc @@ -9,3 +9,4 @@ config SOC_QUARK_SE_C1000_SS select SYS_POWER_STATE_DEEP_SLEEP_1_SUPPORTED select SYS_POWER_STATE_DEEP_SLEEP_2_SUPPORTED select HAS_QMSI + select HAS_SPI_DW diff --git a/soc/arc/snps_emsk/Kconfig.soc b/soc/arc/snps_emsk/Kconfig.soc index d1b89ff5dba..fcbe59a7c02 100644 --- a/soc/arc/snps_emsk/Kconfig.soc +++ b/soc/arc/snps_emsk/Kconfig.soc @@ -8,3 +8,4 @@ config SOC_EMSK bool "Synopsys ARC EM Starter Kit SoC" select HAS_I2C_DW + select HAS_SPI_DW diff --git a/soc/x86/intel_quark/quark_d2000/Kconfig.soc b/soc/x86/intel_quark/quark_d2000/Kconfig.soc index bd0bc8a391d..415ee298785 100644 --- a/soc/x86/intel_quark/quark_d2000/Kconfig.soc +++ b/soc/x86/intel_quark/quark_d2000/Kconfig.soc @@ -2,3 +2,4 @@ config SOC_QUARK_D2000 bool "Intel Quark D2000" depends on SOC_SERIES_QUARK_D2000 + select HAS_SPI_DW diff --git a/soc/x86/intel_quark/quark_se/Kconfig.soc b/soc/x86/intel_quark/quark_se/Kconfig.soc index 19acbf01dbf..092d6e972fc 100644 --- a/soc/x86/intel_quark/quark_se/Kconfig.soc +++ b/soc/x86/intel_quark/quark_se/Kconfig.soc @@ -8,9 +8,11 @@ choice config SOC_QUARK_SE_C1000 bool "Intel Quark SE C1000" + select HAS_SPI_DW config SOC_QUARK_SE_CURIE bool "Intel Curie" + select HAS_SPI_DW endchoice diff --git a/soc/xtensa/intel_s1000/Kconfig.soc b/soc/xtensa/intel_s1000/Kconfig.soc index aa90f0d593c..a06bc02be3c 100644 --- a/soc/xtensa/intel_s1000/Kconfig.soc +++ b/soc/xtensa/intel_s1000/Kconfig.soc @@ -4,4 +4,5 @@ config SOC_INTEL_S1000 bool "intel_s1000" select HAS_I2C_DW + select HAS_SPI_DW