Patchwork [U-Boot,2/2] mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE

login
register
mail settings
Submitter Marek Vasut
Date Feb. 2, 2013, 6:10 a.m.
Message ID <1359785441-29715-2-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/217641/
State Superseded
Delegated to: Stefano Babic
Headers show

Comments

Marek Vasut - Feb. 2, 2013, 6:10 a.m.
The CONFIG_MXS_SPI_DMA_ENABLE is no longer relevant as the SPI DMA
has proven to work correctly. Remove this configuration option.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
---
 drivers/spi/mxs_spi.c     |   16 ----------------
 include/configs/m28evk.h  |    1 -
 include/configs/mx28evk.h |    1 -
 3 files changed, 18 deletions(-)

NOTE: COMPILE TESTED ONLY!!! Someone please test before applying!

Patch

diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index 5a737a1..ca87180 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -40,17 +40,6 @@ 
 
 #define MXSSSP_SMALL_TRANSFER	512
 
-/*
- * CONFIG_MXS_SPI_DMA_ENABLE: Experimental mixed PIO/DMA support for MXS SPI
- *                            host. Use with utmost caution!
- *
- *                            Enabling this is not yet recommended since this
- *                            still doesn't support transfers to/from unaligned
- *                            addresses. Therefore this driver will not work
- *                            for example with saving environment. This is
- *                            caused by DMA alignment constraints on MXS.
- */
-
 struct mxs_spi_slave {
 	struct spi_slave	slave;
 	uint32_t		max_khz;
@@ -347,12 +336,7 @@  int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
 	char dummy;
 	int write = 0;
 	char *data = NULL;
-
-#ifdef CONFIG_MXS_SPI_DMA_ENABLE
 	int dma = 1;
-#else
-	int dma = 0;
-#endif
 
 	if (bitlen == 0) {
 		if (flags & SPI_XFER_END) {
diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index 1b51fe2..59a7be9 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -244,7 +244,6 @@ 
 #ifdef	CONFIG_CMD_SPI
 #define	CONFIG_HARD_SPI
 #define	CONFIG_MXS_SPI
-#define	CONFIG_MXS_SPI_DMA_ENABLE
 #define	CONFIG_SPI_HALF_DUPLEX
 #define	CONFIG_DEFAULT_SPI_BUS		2
 #define	CONFIG_DEFAULT_SPI_CS		0
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 71447d9..6a46f3c 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -202,7 +202,6 @@ 
 #ifdef CONFIG_CMD_SPI
 #define CONFIG_HARD_SPI
 #define CONFIG_MXS_SPI
-#define CONFIG_MXS_SPI_DMA_ENABLE
 #define CONFIG_SPI_HALF_DUPLEX
 #define CONFIG_DEFAULT_SPI_BUS		2
 #define CONFIG_DEFAULT_SPI_MODE		SPI_MODE_0