[U-Boot] [PATCH v2 5/6] spi: Zap CONFIG_HARD_SPI

Jagan Teki jagan at amarulasolutions.com
Sat Nov 24 12:13:21 UTC 2018


In legacy CONFIG_HARD_SPI initalizing spi_init code, which
was removed during dm conversion cleanup.

So remove the dead instances of CONFIG_HARD_SPI, and related
code.

Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
---
 README                                    |  8 --------
 arch/powerpc/include/asm/config.h         |  7 -------
 board/freescale/mpc8349emds/mpc8349emds.c |  2 +-
 board/ids/ids8313/ids8313.c               |  2 +-
 common/board_f.c                          | 12 ------------
 include/configs/M52277EVB.h               |  1 -
 include/configs/M54418TWR.h               |  1 -
 include/configs/M54451EVB.h               |  1 -
 include/configs/M54455EVB.h               |  1 -
 include/configs/MPC8536DS.h               |  5 -----
 include/configs/P1022DS.h                 |  6 ------
 include/configs/UCP1020.h                 |  5 -----
 include/configs/controlcenterd.h          |  4 ----
 include/configs/dreamplug.h               |  1 -
 include/configs/ds109.h                   |  1 -
 include/configs/ids8313.h                 | 10 ----------
 include/configs/mx31pdk.h                 |  1 -
 include/configs/mxs.h                     |  1 -
 include/configs/p1_p2_rdb_pc.h            |  5 -----
 include/configs/p1_twr.h                  |  5 -----
 include/configs/stmark2.h                 |  1 -
 include/configs/ts4800.h                  |  5 -----
 scripts/config_whitelist.txt              |  1 -
 23 files changed, 2 insertions(+), 84 deletions(-)

diff --git a/README b/README
index a46c7c63a4..17d56b8034 100644
--- a/README
+++ b/README
@@ -1932,14 +1932,6 @@ The following options need to be configured:
 		SPI configuration items (port pins to use, etc). For
 		an example, see include/configs/sacsng.h.
 
-		CONFIG_HARD_SPI
-
-		Enables a hardware SPI driver for general-purpose reads
-		and writes.  As with CONFIG_SOFT_SPI, the board configuration
-		must define a list of chip-select function pointers.
-		Currently supported on some MPC8xxx processors.	 For an
-		example, see include/configs/mpc8349emds.h.
-
 		CONFIG_SYS_SPI_MXC_WAIT
 		Timeout for waiting until spi transfer completed.
 		default: (CONFIG_SYS_HZ/100)     /* 10 ms */
diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h
index 849a69aced..c9c9964630 100644
--- a/arch/powerpc/include/asm/config.h
+++ b/arch/powerpc/include/asm/config.h
@@ -18,13 +18,6 @@
   #define HWCONFIG_BUFFER_SIZE 256
 #endif
 
-/* CONFIG_HARD_SPI triggers SPI bus initialization in PowerPC */
-#if defined(CONFIG_MPC8XXX_SPI) || defined(CONFIG_FSL_ESPI)
-# ifndef CONFIG_HARD_SPI
-#  define CONFIG_HARD_SPI
-# endif
-#endif
-
 #define CONFIG_LMB
 #define CONFIG_SYS_BOOT_RAMDISK_HIGH
 
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c
index 4ec0af4d1c..d40ed3742e 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -273,7 +273,7 @@ void spi_cs_deactivate(struct spi_slave *slave)
 
 	iopd->dat |=  SPI_CS_MASK;
 }
-#endif /* CONFIG_HARD_SPI */
+#endif
 
 #if defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, bd_t *bd)
diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c
index a411d4e7f6..d547af4b05 100644
--- a/board/ids/ids8313/ids8313.c
+++ b/board/ids/ids8313/ids8313.c
@@ -208,4 +208,4 @@ void spi_cs_deactivate(struct spi_slave *slave)
 	/* deactivate the spi_cs */
 	setbits_be32(&iopd->dat, IDSCPLD_SPI_CS_MASK);
 }
-#endif /* CONFIG_HARD_SPI */
+#endif
diff --git a/common/board_f.c b/common/board_f.c
index 60634e52cd..a3e80ca951 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -257,15 +257,6 @@ __weak int init_func_vid(void)
 }
 #endif
 
-#if defined(CONFIG_HARD_SPI)
-static int init_func_spi(void)
-{
-	puts("SPI:   ");
-	puts("ready\n");
-	return 0;
-}
-#endif
-
 static int setup_mon_len(void)
 {
 #if defined(__ARM__) || defined(__MICROBLAZE__)
@@ -863,9 +854,6 @@ static const init_fnc_t init_sequence_f[] = {
 #endif
 #if defined(CONFIG_VID) && !defined(CONFIG_SPL)
 	init_func_vid,
-#endif
-#if defined(CONFIG_HARD_SPI)
-	init_func_spi,
 #endif
 	announce_dram_init,
 	dram_init,		/* configure available RAM banks */
diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h
index 11cb3955da..83d774527a 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -102,7 +102,6 @@
 
 /* DSPI and Serial Flash */
 #define CONFIG_CF_DSPI
-#define CONFIG_HARD_SPI
 #define CONFIG_SYS_SBFHDR_SIZE		0x7
 #ifdef CONFIG_CMD_SPI
 #	define CONFIG_SYS_DSPI_CS2
diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h
index f08896ef0a..4b8ef38c0b 100644
--- a/include/configs/M54418TWR.h
+++ b/include/configs/M54418TWR.h
@@ -151,7 +151,6 @@
 /* DSPI and Serial Flash */
 #define CONFIG_CF_DSPI
 #define CONFIG_SERIAL_FLASH
-#define CONFIG_HARD_SPI
 #define CONFIG_SYS_SBFHDR_SIZE		0x7
 #ifdef CONFIG_CMD_SPI
 
diff --git a/include/configs/M54451EVB.h b/include/configs/M54451EVB.h
index 16becbdbed..87cdbae1db 100644
--- a/include/configs/M54451EVB.h
+++ b/include/configs/M54451EVB.h
@@ -116,7 +116,6 @@
 /* DSPI and Serial Flash */
 #define CONFIG_CF_DSPI
 #define CONFIG_SERIAL_FLASH
-#define CONFIG_HARD_SPI
 #define CONFIG_SYS_SBFHDR_SIZE		0x7
 #ifdef CONFIG_CMD_SPI
 
diff --git a/include/configs/M54455EVB.h b/include/configs/M54455EVB.h
index 99b60d5d82..d41b7c4492 100644
--- a/include/configs/M54455EVB.h
+++ b/include/configs/M54455EVB.h
@@ -142,7 +142,6 @@
 
 /* DSPI and Serial Flash */
 #define CONFIG_CF_DSPI
-#define CONFIG_HARD_SPI
 #define CONFIG_SYS_SBFHDR_SIZE		0x13
 #ifdef CONFIG_CMD_SPI
 
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 524a10fc95..86a1233e32 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -370,11 +370,6 @@
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
 #define CONFIG_SYS_EEPROM_BUS_NUM	1
 
-/*
- * eSPI - Enhanced SPI
- */
-#define CONFIG_HARD_SPI
-
 #if defined(CONFIG_SPI_FLASH)
 #define CONFIG_SF_DEFAULT_SPEED	10000000
 #define CONFIG_SF_DEFAULT_MODE	0
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index c9ed70ca4c..eeb19a9fa6 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -386,12 +386,6 @@
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
 #define CONFIG_SYS_EEPROM_BUS_NUM	1
 
-/*
- * eSPI - Enhanced SPI
- */
-
-#define CONFIG_HARD_SPI
-
 #define CONFIG_SF_DEFAULT_SPEED		10000000
 #define CONFIG_SF_DEFAULT_MODE		0
 
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index 423ecd71c2..1bbe9d9b37 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -287,11 +287,6 @@
 #define CONFIG_SYS_I2C_NCT72_ADDR	0x4C
 #define CONFIG_SYS_I2C_IDT6V49205B	0x69
 
-/*
- * eSPI - Enhanced SPI
- */
-#define CONFIG_HARD_SPI
-
 #define CONFIG_SF_DEFAULT_SPEED		10000000
 #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
 
diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h
index 4adcd956ef..1908d35bcc 100644
--- a/include/configs/controlcenterd.h
+++ b/include/configs/controlcenterd.h
@@ -182,10 +182,6 @@
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
 
 #ifndef CONFIG_TRAILBLAZER
-/*
- * eSPI - Enhanced SPI
- */
-#define CONFIG_HARD_SPI
 
 #define CONFIG_SF_DEFAULT_SPEED		10000000
 #define CONFIG_SF_DEFAULT_MODE		0
diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
index 1c94bf9fa1..f4d717213c 100644
--- a/include/configs/dreamplug.h
+++ b/include/configs/dreamplug.h
@@ -35,7 +35,6 @@
 #endif
 
 #ifdef CONFIG_CMD_SF
-#define CONFIG_HARD_SPI			1
 #define CONFIG_ENV_SPI_BUS		0
 #define CONFIG_ENV_SPI_CS		0
 #define CONFIG_ENV_SPI_MAX_HZ		50000000 /* 50 MHz */
diff --git a/include/configs/ds109.h b/include/configs/ds109.h
index c06f0058de..2c7928e88c 100644
--- a/include/configs/ds109.h
+++ b/include/configs/ds109.h
@@ -38,7 +38,6 @@
 #endif
 
 #ifdef CONFIG_CMD_SF
-#define CONFIG_HARD_SPI			1
 #define CONFIG_ENV_SPI_BUS		0
 #define CONFIG_ENV_SPI_CS		0
 #define CONFIG_ENV_SPI_MAX_HZ		50000000 /* 50 MHz */
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 28124dd4b1..7e4c497fe0 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -159,7 +159,6 @@
  */
 #define CONFIG_TSEC1
 #define CONFIG_TSEC2
-#define CONFIG_HARD_SPI
 
 /*
  * NOR FLASH setup
@@ -273,15 +272,6 @@
 #define CONFIG_RTC_PCF8563
 #define CONFIG_SYS_I2C_RTC_ADDR	0x51
 
-/*
- * SPI setup
- */
-#ifdef CONFIG_HARD_SPI
-#define CONFIG_SYS_GPIO1_PRELIM
-#define CONFIG_SYS_GPIO1_DIR		0x00000001
-#define CONFIG_SYS_GPIO1_DAT		0x00000001
-#endif
-
 /*
  * Ethernet setup
  */
diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h
index 7d84d160b4..4765764f83 100644
--- a/include/configs/mx31pdk.h
+++ b/include/configs/mx31pdk.h
@@ -43,7 +43,6 @@
 #define CONFIG_MXC_UART
 #define CONFIG_MXC_UART_BASE	UART1_BASE
 
-#define CONFIG_HARD_SPI
 #define CONFIG_DEFAULT_SPI_BUS	1
 #define CONFIG_DEFAULT_SPI_MODE	(SPI_MODE_0 | SPI_CS_HIGH)
 
diff --git a/include/configs/mxs.h b/include/configs/mxs.h
index 9e59e7a4dc..4bb3621a42 100644
--- a/include/configs/mxs.h
+++ b/include/configs/mxs.h
@@ -143,7 +143,6 @@
 
 /* SPI */
 #ifdef CONFIG_CMD_SPI
-#define CONFIG_HARD_SPI
 #define CONFIG_SPI_HALF_DUPLEX
 #endif
 
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 9465fb4702..459ecf328f 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -576,11 +576,6 @@
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
 
-/*
- * eSPI - Enhanced SPI
- */
-#define CONFIG_HARD_SPI
-
 #if defined(CONFIG_SPI_FLASH)
 #define CONFIG_SF_DEFAULT_SPEED	10000000
 #define CONFIG_SF_DEFAULT_MODE	0
diff --git a/include/configs/p1_twr.h b/include/configs/p1_twr.h
index d018c22afd..4f48370648 100644
--- a/include/configs/p1_twr.h
+++ b/include/configs/p1_twr.h
@@ -214,11 +214,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
 
-/*
- * eSPI - Enhanced SPI
- */
-#define CONFIG_HARD_SPI
-
 #if defined(CONFIG_PCI)
 /*
  * General PCI
diff --git a/include/configs/stmark2.h b/include/configs/stmark2.h
index c408db865e..33ddc67bf4 100644
--- a/include/configs/stmark2.h
+++ b/include/configs/stmark2.h
@@ -66,7 +66,6 @@
 #define CONFIG_CF_DSPI
 #define CONFIG_SF_DEFAULT_SPEED		50000000
 #define CONFIG_SERIAL_FLASH
-#define CONFIG_HARD_SPI
 #define CONFIG_ENV_SPI_BUS		0
 #define CONFIG_ENV_SPI_CS		1
 
diff --git a/include/configs/ts4800.h b/include/configs/ts4800.h
index 956f7795f1..4e274bd414 100644
--- a/include/configs/ts4800.h
+++ b/include/configs/ts4800.h
@@ -42,11 +42,6 @@
 #define CONFIG_MXC_UART
 #define CONFIG_MXC_UART_BASE	UART1_BASE
 
-/*
- * SPI Configs
- * */
-#define CONFIG_HARD_SPI /* puts SPI: ready */
-
 /*
  * MMC Configs
  * */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index abfb0ff89f..1404fd855b 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -750,7 +750,6 @@ CONFIG_G_DNL_UMS_PRODUCT_NUM
 CONFIG_G_DNL_UMS_VENDOR_NUM
 CONFIG_H264_FREQ
 CONFIG_H8300
-CONFIG_HARD_SPI
 CONFIG_HAS_ETH0
 CONFIG_HAS_ETH1
 CONFIG_HAS_ETH2
-- 
2.18.0.321.gffc6fa0e3



More information about the U-Boot mailing list