[U-Boot] [PATCH] Convert CONFIG_SPI to Kconfig
Adam Ford
aford173 at gmail.com
Sat Dec 30 14:39:38 UTC 2017
This converts the following to Kconfig:
CONFIG_SPI
Signed-off-by: Adam Ford <aford173 at gmail.com>
---
configs/cm_t335_defconfig | 1 +
configs/devkit8000_defconfig | 1 +
drivers/spi/Kconfig | 8 ++++++--
include/configs/alt.h | 1 -
include/configs/blanche.h | 1 -
include/configs/brppt1.h | 1 -
include/configs/cl-som-imx7.h | 1 -
include/configs/cm_fx6.h | 1 -
include/configs/cm_t335.h | 1 -
include/configs/da850evm.h | 1 -
include/configs/devkit8000.h | 1 -
include/configs/ea20.h | 1 -
include/configs/gose.h | 1 -
include/configs/koelsch.h | 1 -
include/configs/lager.h | 1 -
include/configs/legoev3.h | 1 -
include/configs/microblaze-generic.h | 1 -
include/configs/omapl138_lcdk.h | 1 -
include/configs/ot1200.h | 1 -
include/configs/porter.h | 1 -
include/configs/rk3036_common.h | 1 -
include/configs/rk3128_common.h | 1 -
include/configs/rk3188_common.h | 1 -
include/configs/rk3288_common.h | 1 -
include/configs/rk3328_common.h | 1 -
include/configs/rut.h | 2 --
include/configs/siemens-am33x-common.h | 1 -
include/configs/silk.h | 1 -
include/configs/stout.h | 1 -
include/configs/taurus.h | 1 -
include/configs/ti_armv7_common.h | 1 -
include/configs/x86-common.h | 1 -
scripts/config_whitelist.txt | 1 -
33 files changed, 8 insertions(+), 33 deletions(-)
diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig
index 608c25a..be2d1f0 100644
--- a/configs/cm_t335_defconfig
+++ b/configs/cm_t335_defconfig
@@ -56,5 +56,6 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
CONFIG_PHYLIB=y
CONFIG_SYS_NS16550=y
+# CONFIG_SPI is not set
CONFIG_FAT_WRITE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/devkit8000_defconfig b/configs/devkit8000_defconfig
index 2e97a88..3ea7f98 100644
--- a/configs/devkit8000_defconfig
+++ b/configs/devkit8000_defconfig
@@ -36,4 +36,5 @@ CONFIG_NAND=y
CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_SYS_NS16550=y
+# CONFIG_SPI is not set
CONFIG_OF_LIBFDT=y
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 494639f..c33501c 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -1,4 +1,8 @@
-menu "SPI Support"
+menuconfig SPI
+ bool "SPI Support"
+ default y
+
+if SPI
config DM_SPI
bool "Enable Driver Model for SPI drivers"
@@ -236,4 +240,4 @@ config OMAP3_SPI
(McSPI). This driver be used to access SPI chips on platforms
embedding this OMAP3 McSPI IP core.
-endmenu # menu "SPI Support"
+endif # menu "SPI Support"
diff --git a/include/configs/alt.h b/include/configs/alt.h
index 35518da..e606a49 100644
--- a/include/configs/alt.h
+++ b/include/configs/alt.h
@@ -39,7 +39,6 @@
/* SCIF */
/* FLASH */
-#define CONFIG_SPI
#define CONFIG_SH_QSPI
#define CONFIG_SPI_FLASH_QUAD
diff --git a/include/configs/blanche.h b/include/configs/blanche.h
index ce7c716..867cdb3 100755
--- a/include/configs/blanche.h
+++ b/include/configs/blanche.h
@@ -40,7 +40,6 @@
/* FLASH */
#if !defined(CONFIG_MTD_NOR_FLASH)
#define CONFIG_SYS_TEXT_BASE 0x40000000
-#define CONFIG_SPI
#define CONFIG_SH_QSPI
#define CONFIG_SH_QSPI_BASE 0xE6B10000
#else
diff --git a/include/configs/brppt1.h b/include/configs/brppt1.h
index 2dadcae..1f73130 100644
--- a/include/configs/brppt1.h
+++ b/include/configs/brppt1.h
@@ -220,7 +220,6 @@ MMCARGS
#if defined(CONFIG_SPI_BOOT)
/* McSPI IP block */
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 24000000
#define CONFIG_SPL_SPI_LOAD
diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h
index 14c4712..33add17 100644
--- a/include/configs/cl-som-imx7.h
+++ b/include/configs/cl-som-imx7.h
@@ -147,7 +147,6 @@
(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
/* SPI Flash support */
-#define CONFIG_SPI
#define CONFIG_MXC_SPI
#define CONFIG_SF_DEFAULT_BUS 0
#define CONFIG_SF_DEFAULT_CS 0
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index 5195610..e0fbffd 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -161,7 +161,6 @@
#define CONFIG_PREBOOT "usb start;sf probe"
/* SPI */
-#define CONFIG_SPI
#define CONFIG_MXC_SPI
/* NAND */
diff --git a/include/configs/cm_t335.h b/include/configs/cm_t335.h
index d6ebdcd..d78236f 100644
--- a/include/configs/cm_t335.h
+++ b/include/configs/cm_t335.h
@@ -15,7 +15,6 @@
#include <configs/ti_am335x_common.h>
-#undef CONFIG_SPI
#undef CONFIG_BOOTCOUNT_LIMIT
#undef CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 4364649..1a8d132 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -149,7 +149,6 @@
#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
#define CONFIG_CONS_INDEX 1 /* use UART0 for console */
-#define CONFIG_SPI
#define CONFIG_DAVINCI_SPI
#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
#ifdef CONFIG_SPL_BUILD
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 5f47c0f..fc6d656 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -59,7 +59,6 @@
#undef CONFIG_DM9000_DEBUG
/* SPI */
-#undef CONFIG_SPI
/* I2C */
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index c5e6e9e..35358bf 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -60,7 +60,6 @@
#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
#define CONFIG_CONS_INDEX 1 /* use UART0 for console */
-#define CONFIG_SPI
#define CONFIG_DAVINCI_SPI
#define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE
#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
diff --git a/include/configs/gose.h b/include/configs/gose.h
index 610ba1a..0dbacb6 100644
--- a/include/configs/gose.h
+++ b/include/configs/gose.h
@@ -40,7 +40,6 @@
/* SCIF */
/* FLASH */
-#define CONFIG_SPI
#define CONFIG_SH_QSPI
/* SH Ether */
diff --git a/include/configs/koelsch.h b/include/configs/koelsch.h
index b9214d2..c65a3e7 100644
--- a/include/configs/koelsch.h
+++ b/include/configs/koelsch.h
@@ -40,7 +40,6 @@
/* SCIF */
/* FLASH */
-#define CONFIG_SPI
#define CONFIG_SH_QSPI
/* SH Ether */
diff --git a/include/configs/lager.h b/include/configs/lager.h
index 291b03c..2e7585d 100644
--- a/include/configs/lager.h
+++ b/include/configs/lager.h
@@ -40,7 +40,6 @@
/* SCIF */
/* SPI */
-#define CONFIG_SPI
#define CONFIG_SH_QSPI
/* SH Ether */
diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h
index c27373c..9ddb0d0 100644
--- a/include/configs/legoev3.h
+++ b/include/configs/legoev3.h
@@ -123,7 +123,6 @@
#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
#define CONFIG_CONS_INDEX 1 /* use UART0 for console */
-#define CONFIG_SPI
#define CONFIG_DAVINCI_SPI
#define CONFIG_SYS_SPI_BASE DAVINCI_SPI0_BASE
#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI0_CLKID)
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 41e6790..a19c629 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -109,7 +109,6 @@
#ifdef SPIFLASH
# define CONFIG_SYS_SPI_BASE XILINX_SPI_FLASH_BASEADDR
-# define CONFIG_SPI 1
# define CONFIG_SF_DEFAULT_MODE SPI_MODE_3
# define CONFIG_SF_DEFAULT_SPEED XILINX_SPI_FLASH_MAX_FREQ
# define CONFIG_SF_DEFAULT_CS XILINX_SPI_FLASH_CS
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 5dba7d2..c57db72 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -128,7 +128,6 @@
#define CONFIG_CONS_INDEX 1 /* use UART0 for console */
#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
-#define CONFIG_SPI
#define CONFIG_DAVINCI_SPI
#define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE
#define CONFIG_SYS_SPI_CLK clk_get(DAVINCI_SPI1_CLKID)
diff --git a/include/configs/ot1200.h b/include/configs/ot1200.h
index 051416e..c36e7c1 100644
--- a/include/configs/ot1200.h
+++ b/include/configs/ot1200.h
@@ -20,7 +20,6 @@
#define CONFIG_MXC_UART_BASE UART1_BASE
/* SF Configs */
-#define CONFIG_SPI
#define CONFIG_MXC_SPI
#define CONFIG_SF_DEFAULT_BUS 2
#define CONFIG_SF_DEFAULT_CS 0
diff --git a/include/configs/porter.h b/include/configs/porter.h
index 451d9dd..c00a40d 100644
--- a/include/configs/porter.h
+++ b/include/configs/porter.h
@@ -40,7 +40,6 @@
/* SCIF */
/* FLASH */
-#define CONFIG_SPI
#define CONFIG_SH_QSPI
#define CONFIG_SPI_FLASH_QUAD
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h
index 3a2bf33..e20460b 100644
--- a/include/configs/rk3036_common.h
+++ b/include/configs/rk3036_common.h
@@ -39,7 +39,6 @@
#define SDRAM_MAX_SIZE (CONFIG_NR_DRAM_BANKS * SDRAM_BANK_SIZE)
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SPI_FLASH_GIGADEVICE
#define CONFIG_SF_DEFAULT_SPEED 20000000
diff --git a/include/configs/rk3128_common.h b/include/configs/rk3128_common.h
index e915a56..19a2e15 100644
--- a/include/configs/rk3128_common.h
+++ b/include/configs/rk3128_common.h
@@ -42,7 +42,6 @@
#define SDRAM_MAX_SIZE 0x80000000
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 20000000
#define CONFIG_USB_OHCI_NEW
#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
diff --git a/include/configs/rk3188_common.h b/include/configs/rk3188_common.h
index 0cb0762..1e14aec 100644
--- a/include/configs/rk3188_common.h
+++ b/include/configs/rk3188_common.h
@@ -53,7 +53,6 @@
#define SDRAM_MAX_SIZE 0x80000000
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 20000000
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index e2f070f..d5e7ad8 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -53,7 +53,6 @@
#define SDRAM_MAX_SIZE 0xfe000000
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 20000000
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
index af55632..5ef7df5 100644
--- a/include/configs/rk3328_common.h
+++ b/include/configs/rk3328_common.h
@@ -37,7 +37,6 @@
#define SDRAM_MAX_SIZE 0xff000000
#define CONFIG_SPI_FLASH
-#define CONFIG_SPI
#define CONFIG_SF_DEFAULT_SPEED 20000000
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/rut.h b/include/configs/rut.h
index 71078e9..b4b82de 100644
--- a/include/configs/rut.h
+++ b/include/configs/rut.h
@@ -118,8 +118,6 @@
#define CONFIG_VIDEO_BMP_LOGO
#define DA8XX_LCD_CNTL_BASE LCD_CNTL_BASE
-#define CONFIG_SPI
-
#define BOARD_LCD_RESET 115 /* Bank 3 pin 19 */
#define CONFIG_FORMIKE
#define DISPL_PLL_SPREAD_SPECTRUM
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 78708a2..35d425f 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -67,7 +67,6 @@
#define CONFIG_SYS_LOAD_ADDR 0x81000000 /* Default load address */
-#define CONFIG_SPI
#define CONFIG_MTD_DEVICE
#define CONFIG_SF_DEFAULT_SPEED (75000000)
diff --git a/include/configs/silk.h b/include/configs/silk.h
index 0384325..3fdab0b 100644
--- a/include/configs/silk.h
+++ b/include/configs/silk.h
@@ -40,7 +40,6 @@
/* SCIF */
/* FLASH */
-#define CONFIG_SPI
#define CONFIG_SH_QSPI
#define CONFIG_SPI_FLASH_QUAD
diff --git a/include/configs/stout.h b/include/configs/stout.h
index 9422c04..e3493d0 100644
--- a/include/configs/stout.h
+++ b/include/configs/stout.h
@@ -43,7 +43,6 @@
#define CONFIG_SCIF_A
/* SPI */
-#define CONFIG_SPI
#define CONFIG_SH_QSPI
#define CONFIG_SPI_FLASH_QUAD
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index ce06f7b..6b644a4 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -119,7 +119,6 @@
#endif
/* SPI EEPROM */
-#define CONFIG_SPI
#define CONFIG_ATMEL_SPI
#define TAURUS_SPI_MASK (1 << 4)
#define TAURUS_SPI_CS_PIN AT91_PIN_PA3
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 91e1398..2840a90 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -99,7 +99,6 @@
#endif
/* McSPI IP block */
-#define CONFIG_SPI
/* GPIO block */
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index 064c546..ca72dd3 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -95,7 +95,6 @@
/*-----------------------------------------------------------------------
* FLASH configuration
*/
-#define CONFIG_SPI
/*-----------------------------------------------------------------------
* Environment configuration
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 43a4ff0..3ca51f3 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -2067,7 +2067,6 @@ CONFIG_SPEAR_UART48M
CONFIG_SPEAR_UARTCLKMSK
CONFIG_SPEAR_USBBOOT
CONFIG_SPEAR_USBTTY
-CONFIG_SPI
CONFIG_SPI_ADDR
CONFIG_SPI_BOOTING
CONFIG_SPI_CS_IS_VALID
--
2.7.4
More information about the U-Boot
mailing list