summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2019-02-27 15:20:37 +0100
committerTom Rini <trini@konsulko.com>2019-03-25 17:36:53 -0400
commitc95e632de4a474d89fa733a83a39c66236960edf (patch)
treea774eabc71e5ff5d13ae2e16673bd18f18b2fe55
parent14453fbfadc2f98ca35d6033140466c7a4b4947a (diff)
downloadu-boot-c95e632de4a474d89fa733a83a39c66236960edf.tar.gz
Convert CONFIG_DEFAULT_SPI_* to Kconfig
This converts the following to Kconfig: CONFIG_DEFAULT_SPI_BUS CONFIG_DEFAULT_SPI_MODE Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
-rw-r--r--cmd/Kconfig12
-rw-r--r--cmd/spi.c7
-rw-r--r--configs/bg0900_defconfig1
-rw-r--r--configs/ls1012aqds_qspi_defconfig3
-rw-r--r--configs/ls1012aqds_tfa_SECURE_BOOT_defconfig2
-rw-r--r--configs/ls1012aqds_tfa_defconfig2
-rw-r--r--configs/mx28evk_auart_console_defconfig1
-rw-r--r--configs/mx28evk_defconfig1
-rw-r--r--configs/mx28evk_nand_defconfig1
-rw-r--r--configs/mx28evk_spi_defconfig1
-rw-r--r--configs/mx31pdk_defconfig2
-rw-r--r--include/configs/bg0900.h7
-rw-r--r--include/configs/cl-som-am57x.h1
-rw-r--r--include/configs/ls1012aqds.h2
-rw-r--r--include/configs/mx28evk.h6
-rw-r--r--include/configs/mx31pdk.h3
-rw-r--r--scripts/config_whitelist.txt2
17 files changed, 25 insertions, 29 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 4bcc5c4557..0b07b3b9d7 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -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
diff --git a/cmd/spi.c b/cmd/spi.c
index 9a2edcff65..75226fd368 100644
--- a/cmd/spi.c
+++ b/cmd/spi.c
@@ -22,13 +22,6 @@
# 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.
*/
diff --git a/configs/bg0900_defconfig b/configs/bg0900_defconfig
index a8b5f86f07..2c4d3e3d54 100644
--- a/configs/bg0900_defconfig
+++ b/configs/bg0900_defconfig
@@ -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
diff --git a/configs/ls1012aqds_qspi_defconfig b/configs/ls1012aqds_qspi_defconfig
index 1bf934336e..d2c3eea43b 100644
--- a/configs/ls1012aqds_qspi_defconfig
+++ b/configs/ls1012aqds_qspi_defconfig
@@ -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
diff --git a/configs/ls1012aqds_tfa_SECURE_BOOT_defconfig b/configs/ls1012aqds_tfa_SECURE_BOOT_defconfig
index 747fa3df50..9a6139e58c 100644
--- a/configs/ls1012aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1012aqds_tfa_SECURE_BOOT_defconfig
@@ -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
diff --git a/configs/ls1012aqds_tfa_defconfig b/configs/ls1012aqds_tfa_defconfig
index a41757d5d8..d18d40a28f 100644
--- a/configs/ls1012aqds_tfa_defconfig
+++ b/configs/ls1012aqds_tfa_defconfig
@@ -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
diff --git a/configs/mx28evk_auart_console_defconfig b/configs/mx28evk_auart_console_defconfig
index beb10c41d6..c54b933e53 100644
--- a/configs/mx28evk_auart_console_defconfig
+++ b/configs/mx28evk_auart_console_defconfig
@@ -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
diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig
index be1feb3b1b..187467d3db 100644
--- a/configs/mx28evk_defconfig
+++ b/configs/mx28evk_defconfig
@@ -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
diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig
index 61e35861a0..7d891e7934 100644
--- a/configs/mx28evk_nand_defconfig
+++ b/configs/mx28evk_nand_defconfig
@@ -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
diff --git a/configs/mx28evk_spi_defconfig b/configs/mx28evk_spi_defconfig
index 3198baf4b9..cb5b1b3b75 100644
--- a/configs/mx28evk_spi_defconfig
+++ b/configs/mx28evk_spi_defconfig
@@ -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
diff --git a/configs/mx31pdk_defconfig b/configs/mx31pdk_defconfig
index c6dcb45f87..2267818e10 100644
--- a/configs/mx31pdk_defconfig
+++ b/configs/mx31pdk_defconfig
@@ -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
diff --git a/include/configs/bg0900.h b/include/configs/bg0900.h
index 32b975fcf3..0c3d54a082 100644
--- a/include/configs/bg0900.h
+++ b/include/configs/bg0900.h
@@ -19,11 +19,6 @@
#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"
diff --git a/include/configs/cl-som-am57x.h b/include/configs/cl-som-am57x.h
index c9e80c2daf..687a9e703c 100644
--- a/include/configs/cl-som-am57x.h
+++ b/include/configs/cl-som-am57x.h
@@ -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 */
diff --git a/include/configs/ls1012aqds.h b/include/configs/ls1012aqds.h
index aac782ddc0..fb0d1ba6b2 100644
--- a/include/configs/ls1012aqds.h
+++ b/include/configs/ls1012aqds.h
@@ -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
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 82ac6cc6ce..a078e3a0b8 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -74,12 +74,6 @@
#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
diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h
index 4765764f83..993d131e96 100644
--- a/include/configs/mx31pdk.h
+++ b/include/configs/mx31pdk.h
@@ -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
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index f8de25483c..8c7c1592a5 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -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