[U-Boot] [PATCH v3 12/29] dm: spi: Remove SPI_INIT feature

Simon Glass sjg at chromium.org
Mon Sep 29 21:35:09 CEST 2014


This feature provides for init of a single SPI port for the soft SPI
feature. It is not really compatible with driver model since it assumes a
single SPI port. Also, inserting SPI init into the driver by means of
a #define is not very nice.

This feature is not used by any active boards, so let's remove it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v3: None
Changes in v2: None

 drivers/spi/soft_spi_legacy.c       | 5 -----
 include/configs/s5pc210_universal.h | 1 -
 include/configs/sacsng.h            | 1 -
 include/configs/zipitz2.h           | 1 -
 4 files changed, 8 deletions(-)

diff --git a/drivers/spi/soft_spi_legacy.c b/drivers/spi/soft_spi_legacy.c
index c969be3..941daa7 100644
--- a/drivers/spi/soft_spi_legacy.c
+++ b/drivers/spi/soft_spi_legacy.c
@@ -42,11 +42,6 @@ static inline struct soft_spi_slave *to_soft_spi(struct spi_slave *slave)
  */
 void spi_init (void)
 {
-#ifdef	SPI_INIT
-	volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR;
-
-	SPI_INIT;
-#endif
 }
 
 struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 27f3d0a..4fa8d66 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -194,7 +194,6 @@
 #define CONFIG_SOFT_SPI_GPIO_CS EXYNOS4_GPIO_Y43
 
 #define SPI_DELAY udelay(1)
-#undef SPI_INIT
 #define SPI_SCL(bit) universal_spi_scl(bit)
 #define SPI_SDA(bit) universal_spi_sda(bit)
 #define SPI_READ universal_spi_read()
diff --git a/include/configs/sacsng.h b/include/configs/sacsng.h
index b5064ab..2dee315 100644
--- a/include/configs/sacsng.h
+++ b/include/configs/sacsng.h
@@ -259,7 +259,6 @@
 #define I2C_MOSI	0x00004000      /* PD 17: Master Out, Slave In */
 #define I2C_MISO	0x00008000      /* PD 16: Master In, Slave Out */
 
-#undef  SPI_INIT			/* no port initialization needed */
 #define SPI_READ        ((immr->im_ioport.iop_pdatd & I2C_MISO) != 0)
 #define SPI_SDA(bit)    do {						\
 			if(bit) immr->im_ioport.iop_pdatd |=  I2C_MOSI; \
diff --git a/include/configs/zipitz2.h b/include/configs/zipitz2.h
index 41a7c99..fe331bc 100644
--- a/include/configs/zipitz2.h
+++ b/include/configs/zipitz2.h
@@ -99,7 +99,6 @@
 #define	CONFIG_VIDEO_BMP_GZIP
 #define	CONFIG_VIDEO_BMP_RLE8
 #define	CONFIG_SYS_VIDEO_LOGO_MAX_SIZE	(2 << 20)
-#undef	SPI_INIT
 
 #define	SPI_DELAY	udelay(10)
 #define	SPI_SDA(val)	zipitz2_spi_sda(val)
-- 
2.1.0.rc2.206.gedb03e5



More information about the U-Boot mailing list