diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2014-08-29 12:10:31 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-08-31 08:59:48 -0400 |
commit | f59838a07ae5b26d2e050bc0227599932d22b549 (patch) | |
tree | 4050db4bad64ea5eb7674093c1f0a431449895bd /drivers/spi/Kconfig | |
parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff) |
spi/drivers: Restrict COMPILE_TEST by HAS_DMA where needed
commit dd1053a93fdc11d4 ("spi/drivers: Enable build of drivers with
COMPILE_TEST") allows compile-testing drivers on platforms they're not
meant for.
However, adding "|| COMPILE_TEST" bypasses all other implicit dependencies
assumed by the platform dependencies before, like HAS_DMA.
If NO_DMA=y:
drivers/built-in.o: In function `atmel_spi_dma_unmap_xfer':
drivers/spi/spi-atmel.c:915: undefined reference to `dma_unmap_single'
drivers/spi/spi-atmel.c:918: undefined reference to `dma_unmap_single'
drivers/built-in.o: In function `atmel_spi_next_xfer_data':
drivers/spi/spi-atmel.c:690: undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `atmel_spi_dma_map_xfer':
drivers/spi/spi-atmel.c:890: undefined reference to `dma_map_single'
drivers/spi/spi-atmel.c:893: undefined reference to `dma_mapping_error'
drivers/spi/spi-atmel.c:897: undefined reference to `dma_map_single'
drivers/spi/spi-atmel.c:900: undefined reference to `dma_mapping_error'
drivers/spi/spi-atmel.c:902: undefined reference to `dma_unmap_single'
drivers/built-in.o: In function `atmel_spi_probe':
drivers/spi/spi-atmel.c:1540: undefined reference to `dma_alloc_coherent'
drivers/spi/spi-atmel.c:1623: undefined reference to `dma_free_coherent'
drivers/built-in.o: In function `atmel_spi_remove':
drivers/spi/spi-atmel.c:1665: undefined reference to `dma_free_coherent'
drivers/built-in.o: In function `ep93xx_spi_dma_finish':
drivers/spi/spi-ep93xx.c:550: undefined reference to `dma_unmap_sg'
drivers/built-in.o: In function `ep93xx_spi_dma_prepare':
drivers/spi/spi-ep93xx.c:516: undefined reference to `dma_map_sg'
drivers/spi/spi-ep93xx.c:522: undefined reference to `dma_unmap_sg'
drivers/built-in.o: In function `omap2_mcspi_rx_dma':
drivers/spi/spi-omap2-mcspi.c:475: undefined reference to `dma_unmap_single'
drivers/built-in.o: In function `omap2_mcspi_txrx_dma':
drivers/spi/spi-omap2-mcspi.c:589: undefined reference to `dma_unmap_single'
drivers/built-in.o: In function `omap2_mcspi_transfer_one_message':
drivers/spi/spi-omap2-mcspi.c:1202: undefined reference to `dma_map_single'
drivers/spi/spi-omap2-mcspi.c:1204: undefined reference to `dma_mapping_error'
drivers/spi/spi-omap2-mcspi.c:1211: undefined reference to `dma_map_single'
drivers/spi/spi-omap2-mcspi.c:1213: undefined reference to `dma_mapping_error'
drivers/spi/spi-omap2-mcspi.c:1217: undefined reference to `dma_unmap_single'
drivers/built-in.o: In function `tegra_spi_deinit_dma_param':
drivers/spi/spi-tegra114.c:675: undefined reference to `dma_free_coherent'
drivers/built-in.o: In function `tegra_spi_copy_spi_rxbuf_to_client_rxbuf':
drivers/spi/spi-tegra114.c:415: undefined reference to `dma_sync_single_for_cpu'
drivers/spi/spi-tegra114.c:440: undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `tegra_spi_copy_client_txbuf_to_spi_txbuf':
drivers/spi/spi-tegra114.c:381: undefined reference to `dma_sync_single_for_cpu'
drivers/spi/spi-tegra114.c:405: undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `tegra_spi_start_dma_based_transfer':
drivers/spi/spi-tegra114.c:543: undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `tegra_slink_deinit_dma_param':
drivers/spi/spi-tegra20-slink.c:705: undefined reference to `dma_free_coherent'
drivers/built-in.o: In function `tegra_slink_copy_spi_rxbuf_to_client_rxbuf':
drivers/spi/spi-tegra20-slink.c:427: undefined reference to `dma_sync_single_for_cpu'
drivers/spi/spi-tegra20-slink.c:452: undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `tegra_slink_copy_client_txbuf_to_spi_txbuf':
drivers/spi/spi-tegra20-slink.c:393: undefined reference to `dma_sync_single_for_cpu'
drivers/spi/spi-tegra20-slink.c:417: undefined reference to `dma_sync_single_for_cpu'
drivers/built-in.o: In function `tegra_slink_start_dma_based_transfer':
drivers/spi/spi-tegra20-slink.c:561: undefined reference to `dma_sync_single_for_cpu'
Add dependencies on HAS_DMA to fix this.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/Kconfig')
-rw-r--r-- | drivers/spi/Kconfig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 62e2242ad7e0..db2a50b53f5b 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig | |||
@@ -69,6 +69,7 @@ config SPI_ATH79 | |||
69 | 69 | ||
70 | config SPI_ATMEL | 70 | config SPI_ATMEL |
71 | tristate "Atmel SPI Controller" | 71 | tristate "Atmel SPI Controller" |
72 | depends on HAS_DMA | ||
72 | depends on (ARCH_AT91 || AVR32 || COMPILE_TEST) | 73 | depends on (ARCH_AT91 || AVR32 || COMPILE_TEST) |
73 | help | 74 | help |
74 | This selects a driver for the Atmel SPI Controller, present on | 75 | This selects a driver for the Atmel SPI Controller, present on |
@@ -185,6 +186,7 @@ config SPI_EFM32 | |||
185 | 186 | ||
186 | config SPI_EP93XX | 187 | config SPI_EP93XX |
187 | tristate "Cirrus Logic EP93xx SPI controller" | 188 | tristate "Cirrus Logic EP93xx SPI controller" |
189 | depends on HAS_DMA | ||
188 | depends on ARCH_EP93XX || COMPILE_TEST | 190 | depends on ARCH_EP93XX || COMPILE_TEST |
189 | help | 191 | help |
190 | This enables using the Cirrus EP93xx SPI controller in master | 192 | This enables using the Cirrus EP93xx SPI controller in master |
@@ -314,6 +316,7 @@ config SPI_OMAP_UWIRE | |||
314 | 316 | ||
315 | config SPI_OMAP24XX | 317 | config SPI_OMAP24XX |
316 | tristate "McSPI driver for OMAP" | 318 | tristate "McSPI driver for OMAP" |
319 | depends on HAS_DMA | ||
317 | depends on ARM || ARM64 || AVR32 || HEXAGON || MIPS || SUPERH | 320 | depends on ARM || ARM64 || AVR32 || HEXAGON || MIPS || SUPERH |
318 | depends on ARCH_OMAP2PLUS || COMPILE_TEST | 321 | depends on ARCH_OMAP2PLUS || COMPILE_TEST |
319 | help | 322 | help |
@@ -500,7 +503,7 @@ config SPI_MXS | |||
500 | config SPI_TEGRA114 | 503 | config SPI_TEGRA114 |
501 | tristate "NVIDIA Tegra114 SPI Controller" | 504 | tristate "NVIDIA Tegra114 SPI Controller" |
502 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST | 505 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST |
503 | depends on RESET_CONTROLLER | 506 | depends on RESET_CONTROLLER && HAS_DMA |
504 | help | 507 | help |
505 | SPI driver for NVIDIA Tegra114 SPI Controller interface. This controller | 508 | SPI driver for NVIDIA Tegra114 SPI Controller interface. This controller |
506 | is different than the older SoCs SPI controller and also register interface | 509 | is different than the older SoCs SPI controller and also register interface |
@@ -518,7 +521,7 @@ config SPI_TEGRA20_SFLASH | |||
518 | config SPI_TEGRA20_SLINK | 521 | config SPI_TEGRA20_SLINK |
519 | tristate "Nvidia Tegra20/Tegra30 SLINK Controller" | 522 | tristate "Nvidia Tegra20/Tegra30 SLINK Controller" |
520 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST | 523 | depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST |
521 | depends on RESET_CONTROLLER | 524 | depends on RESET_CONTROLLER && HAS_DMA |
522 | help | 525 | help |
523 | SPI driver for Nvidia Tegra20/Tegra30 SLINK Controller interface. | 526 | SPI driver for Nvidia Tegra20/Tegra30 SLINK Controller interface. |
524 | 527 | ||