diff options
author | Jarkko Nikula <jarkko.nikula@linux.intel.com> | 2016-01-13 09:20:07 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-01-15 13:13:17 -0500 |
commit | 22a33632fb607a18148815548478265a672d5295 (patch) | |
tree | e86893dbd573676bcc1426e117767a5efa2a16d2 | |
parent | d599af65fda384b5e91780485f243c9f2d3e757d (diff) |
spi: pxa2xx: Remove CONFIG_SPI_PXA2XX_DMA
After removal of legacy PXA DMA code by the commit 6356437e65c2
("spi: spi-pxa2xx: remove legacy PXA DMA bits") the
CONFIG_SPI_PXA2XX_DMA follows the CONFIG_SPI_PXA2XX and cannot be disabled
alone. Therefore remove this config symbol and dead definitions from the
spi-pxa2xx.h.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/Kconfig | 4 | ||||
-rw-r--r-- | drivers/spi/Makefile | 3 | ||||
-rw-r--r-- | drivers/spi/spi-pxa2xx.h | 35 |
3 files changed, 1 insertions, 41 deletions
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 8b9c2a38d1cc..c0604aecf45f 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig | |||
@@ -415,10 +415,6 @@ config SPI_PPC4xx | |||
415 | help | 415 | help |
416 | This selects a driver for the PPC4xx SPI Controller. | 416 | This selects a driver for the PPC4xx SPI Controller. |
417 | 417 | ||
418 | config SPI_PXA2XX_DMA | ||
419 | def_bool y | ||
420 | depends on SPI_PXA2XX | ||
421 | |||
422 | config SPI_PXA2XX | 418 | config SPI_PXA2XX |
423 | tristate "PXA2xx SSP SPI master" | 419 | tristate "PXA2xx SSP SPI master" |
424 | depends on (ARCH_PXA || PCI || ACPI) | 420 | depends on (ARCH_PXA || PCI || ACPI) |
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile index 31fb7fb2a0b6..13cee44ec94d 100644 --- a/drivers/spi/Makefile +++ b/drivers/spi/Makefile | |||
@@ -61,8 +61,7 @@ obj-$(CONFIG_SPI_TI_QSPI) += spi-ti-qspi.o | |||
61 | obj-$(CONFIG_SPI_ORION) += spi-orion.o | 61 | obj-$(CONFIG_SPI_ORION) += spi-orion.o |
62 | obj-$(CONFIG_SPI_PL022) += spi-pl022.o | 62 | obj-$(CONFIG_SPI_PL022) += spi-pl022.o |
63 | obj-$(CONFIG_SPI_PPC4xx) += spi-ppc4xx.o | 63 | obj-$(CONFIG_SPI_PPC4xx) += spi-ppc4xx.o |
64 | spi-pxa2xx-platform-objs := spi-pxa2xx.o | 64 | spi-pxa2xx-platform-objs := spi-pxa2xx.o spi-pxa2xx-dma.o |
65 | spi-pxa2xx-platform-$(CONFIG_SPI_PXA2XX_DMA) += spi-pxa2xx-dma.o | ||
66 | obj-$(CONFIG_SPI_PXA2XX) += spi-pxa2xx-platform.o | 65 | obj-$(CONFIG_SPI_PXA2XX) += spi-pxa2xx-platform.o |
67 | obj-$(CONFIG_SPI_PXA2XX_PCI) += spi-pxa2xx-pci.o | 66 | obj-$(CONFIG_SPI_PXA2XX_PCI) += spi-pxa2xx-pci.o |
68 | obj-$(CONFIG_SPI_QUP) += spi-qup.o | 67 | obj-$(CONFIG_SPI_QUP) += spi-qup.o |
diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h index 58efa98313aa..8e781c8b4374 100644 --- a/drivers/spi/spi-pxa2xx.h +++ b/drivers/spi/spi-pxa2xx.h | |||
@@ -147,20 +147,9 @@ static inline void write_SSSR_CS(struct driver_data *drv_data, u32 val) | |||
147 | extern int pxa2xx_spi_flush(struct driver_data *drv_data); | 147 | extern int pxa2xx_spi_flush(struct driver_data *drv_data); |
148 | extern void *pxa2xx_spi_next_transfer(struct driver_data *drv_data); | 148 | extern void *pxa2xx_spi_next_transfer(struct driver_data *drv_data); |
149 | 149 | ||
150 | /* | ||
151 | * Select the right DMA implementation. | ||
152 | */ | ||
153 | #if defined(CONFIG_SPI_PXA2XX_DMA) | ||
154 | #define SPI_PXA2XX_USE_DMA 1 | ||
155 | #define MAX_DMA_LEN SZ_64K | 150 | #define MAX_DMA_LEN SZ_64K |
156 | #define DEFAULT_DMA_CR1 (SSCR1_TSRE | SSCR1_RSRE | SSCR1_TRAIL) | 151 | #define DEFAULT_DMA_CR1 (SSCR1_TSRE | SSCR1_RSRE | SSCR1_TRAIL) |
157 | #else | ||
158 | #undef SPI_PXA2XX_USE_DMA | ||
159 | #define MAX_DMA_LEN 0 | ||
160 | #define DEFAULT_DMA_CR1 0 | ||
161 | #endif | ||
162 | 152 | ||
163 | #ifdef SPI_PXA2XX_USE_DMA | ||
164 | extern bool pxa2xx_spi_dma_is_possible(size_t len); | 153 | extern bool pxa2xx_spi_dma_is_possible(size_t len); |
165 | extern int pxa2xx_spi_map_dma_buffers(struct driver_data *drv_data); | 154 | extern int pxa2xx_spi_map_dma_buffers(struct driver_data *drv_data); |
166 | extern irqreturn_t pxa2xx_spi_dma_transfer(struct driver_data *drv_data); | 155 | extern irqreturn_t pxa2xx_spi_dma_transfer(struct driver_data *drv_data); |
@@ -173,29 +162,5 @@ extern int pxa2xx_spi_set_dma_burst_and_threshold(struct chip_data *chip, | |||
173 | u8 bits_per_word, | 162 | u8 bits_per_word, |
174 | u32 *burst_code, | 163 | u32 *burst_code, |
175 | u32 *threshold); | 164 | u32 *threshold); |
176 | #else | ||
177 | static inline bool pxa2xx_spi_dma_is_possible(size_t len) { return false; } | ||
178 | static inline int pxa2xx_spi_map_dma_buffers(struct driver_data *drv_data) | ||
179 | { | ||
180 | return 0; | ||
181 | } | ||
182 | #define pxa2xx_spi_dma_transfer NULL | ||
183 | static inline void pxa2xx_spi_dma_prepare(struct driver_data *drv_data, | ||
184 | u32 dma_burst) {} | ||
185 | static inline void pxa2xx_spi_dma_start(struct driver_data *drv_data) {} | ||
186 | static inline int pxa2xx_spi_dma_setup(struct driver_data *drv_data) | ||
187 | { | ||
188 | return 0; | ||
189 | } | ||
190 | static inline void pxa2xx_spi_dma_release(struct driver_data *drv_data) {} | ||
191 | static inline int pxa2xx_spi_set_dma_burst_and_threshold(struct chip_data *chip, | ||
192 | struct spi_device *spi, | ||
193 | u8 bits_per_word, | ||
194 | u32 *burst_code, | ||
195 | u32 *threshold) | ||
196 | { | ||
197 | return -ENODEV; | ||
198 | } | ||
199 | #endif | ||
200 | 165 | ||
201 | #endif /* SPI_PXA2XX_H */ | 166 | #endif /* SPI_PXA2XX_H */ |