ASoC: jz4740: Improve build test coverage
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 22 Apr 2014 20:46:36 +0000 (22:46 +0200)
committerMark Brown <broonie@linaro.org>
Wed, 23 Apr 2014 11:18:44 +0000 (12:18 +0100)
Allow the jz4740 audio drivers to be build when CONFIG_COMPILE_TEST is selected.
This should improve the build test coverage. There is one small piece of
platform dependent code in the jz4740-i2s driver. It uses the DMA request type
constants which are defined in a platform specific header. We can solve this by
moving them from the platform specific header to the I2S driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
arch/mips/include/asm/mach-jz4740/dma.h
sound/soc/jz4740/Kconfig
sound/soc/jz4740/jz4740-i2s.c

index 509cd58280444d3f0c6da634dde6d007ba86fca2..14ecc5313d2d3238e4cf85248f0abe729d3f26c1 100644 (file)
@@ -22,8 +22,6 @@ enum jz4740_dma_request_type {
        JZ4740_DMA_TYPE_UART_RECEIVE    = 21,
        JZ4740_DMA_TYPE_SPI_TRANSMIT    = 22,
        JZ4740_DMA_TYPE_SPI_RECEIVE     = 23,
-       JZ4740_DMA_TYPE_AIC_TRANSMIT    = 24,
-       JZ4740_DMA_TYPE_AIC_RECEIVE     = 25,
        JZ4740_DMA_TYPE_MMC_TRANSMIT    = 26,
        JZ4740_DMA_TYPE_MMC_RECEIVE     = 27,
        JZ4740_DMA_TYPE_TCU             = 28,
index 29f76af5d963c2fca31366e7140c21239d18a0f0..1a354a6b6e870e03982ccdd3335c036f614d459e 100644 (file)
@@ -1,24 +1,29 @@
 config SND_JZ4740_SOC
        tristate "SoC Audio for Ingenic JZ4740 SoC"
-       depends on MACH_JZ4740 && SND_SOC
+       depends on MACH_JZ4740 || COMPILE_TEST
        select SND_SOC_GENERIC_DMAENGINE_PCM
        help
          Say Y or M if you want to add support for codecs attached to
          the JZ4740 I2S interface. You will also need to select the audio
          interfaces to support below.
 
+if SND_JZ4740_SOC
+
 config SND_JZ4740_SOC_I2S
-       depends on SND_JZ4740_SOC
        tristate "SoC Audio (I2S protocol) for Ingenic JZ4740 SoC"
+       depends on HAS_IOMEM
        help
          Say Y if you want to use I2S protocol and I2S codec on Ingenic JZ4740
          based boards.
 
 config SND_JZ4740_SOC_QI_LB60
        tristate "SoC Audio support for Qi LB60"
-       depends on SND_JZ4740_SOC && JZ4740_QI_LB60
+       depends on HAS_IOMEM
+       depends on JZ4740_QI_LB60 || COMPILE_TEST
        select SND_JZ4740_SOC_I2S
     select SND_SOC_JZ4740_CODEC
        help
          Say Y if you want to add support for ASoC audio on the Qi LB60 board
          a.k.a Qi Ben NanoNote.
+
+endif
index 8f220009e0f616e0572777c19a15c3a44c658ed8..3f9c3a9ae36fbadd276fd98eec62dcd073136232 100644 (file)
 #include <sound/initval.h>
 #include <sound/dmaengine_pcm.h>
 
-#include <asm/mach-jz4740/dma.h>
-
 #include "jz4740-i2s.h"
 
+#define JZ4740_DMA_TYPE_AIC_TRANSMIT 24
+#define JZ4740_DMA_TYPE_AIC_RECEIVE 25
+
 #define JZ_REG_AIC_CONF                0x00
 #define JZ_REG_AIC_CTRL                0x04
 #define JZ_REG_AIC_I2S_FMT     0x10