Convert CONFIG_DEFAULT_SPI_* to Kconfig
authorPatrick Delaunay <patrick.delaunay@st.com>
Wed, 27 Feb 2019 14:20:37 +0000 (15:20 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 25 Mar 2019 21:36:53 +0000 (17:36 -0400)
This converts the following to Kconfig:
   CONFIG_DEFAULT_SPI_BUS
   CONFIG_DEFAULT_SPI_MODE

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
17 files changed:
cmd/Kconfig
cmd/spi.c
configs/bg0900_defconfig
configs/ls1012aqds_qspi_defconfig
configs/ls1012aqds_tfa_SECURE_BOOT_defconfig
configs/ls1012aqds_tfa_defconfig
configs/mx28evk_auart_console_defconfig
configs/mx28evk_defconfig
configs/mx28evk_nand_defconfig
configs/mx28evk_spi_defconfig
configs/mx31pdk_defconfig
include/configs/bg0900.h
include/configs/cl-som-am57x.h
include/configs/ls1012aqds.h
include/configs/mx28evk.h
include/configs/mx31pdk.h
scripts/config_whitelist.txt

index 4bcc5c45579d94fb792607e090bd01c80fdad94e..0b07b3b9d777c246bfcd413337396fdd5db20dca 100644 (file)
@@ -1040,10 +1040,20 @@ config CMD_SF_TEST
          everything is working properly.
 
 config CMD_SPI
-       bool "sspi"
+       bool "sspi - Command to access spi device"
        help
          SPI utility command.
 
+config DEFAULT_SPI_BUS
+       int "default spi bus used by sspi command"
+       depends on CMD_SPI
+       default 0
+
+config DEFAULT_SPI_MODE
+       hex "default spi mode used by sspi command (see include/spi.h)"
+       depends on CMD_SPI
+       default 0
+
 config CMD_TSI148
        bool "tsi148 - Command to access tsi148 device"
        help
index 9a2edcff65cafaaaaaa19ad42d6b3bd1ff563a79..75226fd36884cbd310477ca5adbc7eb93c8ef325 100644 (file)
--- a/cmd/spi.c
+++ b/cmd/spi.c
 #   define MAX_SPI_BYTES 32    /* Maximum number of bytes we can handle */
 #endif
 
-#ifndef CONFIG_DEFAULT_SPI_BUS
-#   define CONFIG_DEFAULT_SPI_BUS      0
-#endif
-#ifndef CONFIG_DEFAULT_SPI_MODE
-#   define CONFIG_DEFAULT_SPI_MODE     SPI_MODE_0
-#endif
-
 /*
  * Values from last command.
  */
index a8b5f86f078dd8f1b96e3d0645a75bf33c45bf01..2c4d3e3d54bc073d3bf96087daef4658a09be06b 100644 (file)
@@ -23,6 +23,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
+CONFIG_DEFAULT_SPI_BUS=2
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
index 1bf934336eeb4b350c0ed248374d937008b91d19..d2c3eea43bb7a4e4e82a80ea8f045e5c3ef2eea1 100644 (file)
@@ -27,7 +27,10 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_DEFAULT_SPI_BUS=1
 CONFIG_CMD_USB=y
+CONFIG_DEFAULT_SPI_BUS=1
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_DATE=y
index 747fa3df5026ae4e8ce9b302c311820d3f5bb46f..9a6139e58cee9725cd770c62ce5f79cadb9c5d76 100644 (file)
@@ -27,6 +27,8 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_DEFAULT_SPI_BUS=1
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
index a41757d5d80bed1717c164f20ba35f1cc4b8d637..d18d40a28f0c9497226e842f5bbbf0e26d34a11b 100644 (file)
@@ -27,6 +27,8 @@ CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_DEFAULT_SPI_BUS=1
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
index beb10c41d6969f51fdc3a26575d2dba1bc00fb24..c54b933e5337bf321d8fd5705bcb28d2eb3b0707 100644 (file)
@@ -23,6 +23,7 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
+CONFIG_DEFAULT_SPI_BUS=2
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index be1feb3b1b0e48c47eb7f09d9753c2a8bca2fcec..187467d3db0f41016da3723de59d2256fbfb2d0e 100644 (file)
@@ -23,6 +23,7 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
+CONFIG_DEFAULT_SPI_BUS=2
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index 61e35861a0736457c497066c0c5134331e897975..7d891e793470823c1adb8ea3efe9418ffe75e3b3 100644 (file)
@@ -22,6 +22,7 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
+CONFIG_DEFAULT_SPI_BUS=2
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index 3198baf4b96bd38d4c033f9359d711848db52b4b..cb5b1b3b756500be9b2934dab10b44710103467f 100644 (file)
@@ -22,6 +22,7 @@ CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
+CONFIG_DEFAULT_SPI_BUS=2
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index c6dcb45f878344b6675e6538f1c5b8f7573e16cd..2267818e106da117d12df773fce19296a6136564 100644 (file)
@@ -13,6 +13,8 @@ CONFIG_SPL_NAND_SUPPORT=y
 # CONFIG_AUTO_COMPLETE is not set
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_SPI=y
+CONFIG_DEFAULT_SPI_BUS=1
+CONFIG_DEFAULT_SPI_MODE=4
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
index 32b975fcf3148f55cf6a0a3a62417f3acd575a5a..0c3d54a0821605f538d3953a87c3b10ef814dad3 100644 (file)
 #define CONFIG_FEC_MXC
 #endif
 
-/* SPI */
-#ifdef CONFIG_CMD_SPI
-#define CONFIG_DEFAULT_SPI_BUS         2
-#define CONFIG_DEFAULT_SPI_MODE                SPI_MODE_0
-
 /* SPI FLASH */
 #ifdef CONFIG_CMD_SF
 #define CONFIG_ENV_SPI_BUS             2
@@ -32,8 +27,6 @@
 #define CONFIG_ENV_SPI_MODE            SPI_MODE_0
 #endif
 
-#endif
-
 /* Boot Linux */
 #define CONFIG_BOOTFILE                "uImage"
 #define CONFIG_BOOTCOMMAND     "bootm"
index c9e80c2daf24b06f1dac9773f932f074ff8e9073..687a9e703ca4e9d3669298216d8bfaa4d91d48b0 100644 (file)
@@ -27,7 +27,6 @@
 
 /* SPI Flash support */
 #define CONFIG_TI_SPI_MMAP
-#define CONFIG_DEFAULT_SPI_MODE                SPI_MODE_3
 
 /* SPI SPL defines */
 /* Offsets: 0K - SPL1, 64K - SPL2, 128K - SPL3, 192K - SPL4, 256K - U-Boot */
index aac782ddc044eadfd82cf4cf49dd35a20da391db..fb0d1ba6b27df4be14504fa335971ce3e80030d5 100644 (file)
@@ -74,9 +74,7 @@
 
 /* DSPI */
 #define CONFIG_FSL_DSPI1
-#define CONFIG_DEFAULT_SPI_BUS 1
 
-#define CONFIG_CMD_SPI
 #define MMAP_DSPI          DSPI1_BASE_ADDR
 
 #define CONFIG_SYS_DSPI_CTAR0   1
index 82ac6cc6ce01366008f61bf8bf592094c628b7ed..a078e3a0b8004f2a07ccb0815773732496c2b386 100644 (file)
 #define CONFIG_USB_MAX_CONTROLLER_COUNT        1
 #endif
 
-/* SPI */
-#ifdef CONFIG_CMD_SPI
-#define CONFIG_DEFAULT_SPI_BUS         2
-#define CONFIG_DEFAULT_SPI_MODE                SPI_MODE_0
-#endif
-
 /* Framebuffer support */
 #ifdef CONFIG_VIDEO
 #define CONFIG_VIDEO_LOGO
index 4765764f83a9edebf8e38ef9d26e9aeffc81fcb9..993d131e96df80d85ff2062eeca1ed60ece448eb 100644 (file)
@@ -43,9 +43,6 @@
 #define CONFIG_MXC_UART
 #define CONFIG_MXC_UART_BASE   UART1_BASE
 
-#define CONFIG_DEFAULT_SPI_BUS 1
-#define CONFIG_DEFAULT_SPI_MODE        (SPI_MODE_0 | SPI_CS_HIGH)
-
 /* PMIC Controller */
 #define CONFIG_POWER
 #define CONFIG_POWER_SPI
index f8de25483cd74447c9000bb3e2fb60414ecc3f9a..8c7c1592a562435a758b19ed84d1e6274994c260 100644 (file)
@@ -340,8 +340,6 @@ CONFIG_DEEP_SLEEP
 CONFIG_DEFAULT
 CONFIG_DEFAULT_CONSOLE
 CONFIG_DEFAULT_IMMR
-CONFIG_DEFAULT_SPI_BUS
-CONFIG_DEFAULT_SPI_MODE
 CONFIG_DEF_HWCONFIG
 CONFIG_DELAY_ENVIRONMENT
 CONFIG_DESIGNWARE_ETH