浏览代码

dmaengine: sh: Rework Kconfig and Makefile

Separate helpers and drivers in the Kconfig and Makefile to improve
readability and move the CONFIG_OF dependency from the Makefile to
Kconfig.

[pebolle@tiscali.nl: reported need to rename SHDMA_R8A73A4 instances]
Reported-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[horms+renesas@verge.net.au: squashed rename of SHDMA_R8A73A4 instances]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Laurent Pinchart 11 年之前
父节点
当前提交
9f2c2bb312
共有 3 个文件被更改,包括 32 次插入10 次删除
  1. 19 5
      drivers/dma/sh/Kconfig
  2. 12 4
      drivers/dma/sh/Makefile
  3. 1 1
      drivers/dma/sh/shdma.h

+ 19 - 5
drivers/dma/sh/Kconfig

@@ -2,21 +2,39 @@
 # DMA engine configuration for sh
 # DMA engine configuration for sh
 #
 #
 
 
+#
+# DMA Engine Helpers
+#
+
 config SH_DMAE_BASE
 config SH_DMAE_BASE
 	bool "Renesas SuperH DMA Engine support"
 	bool "Renesas SuperH DMA Engine support"
-	depends on (SUPERH && SH_DMA) || ARCH_SHMOBILE || COMPILE_TEST
+	depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST
+	depends on !SUPERH || SH_DMA
 	depends on !SH_DMA_API
 	depends on !SH_DMA_API
 	default y
 	default y
 	select DMA_ENGINE
 	select DMA_ENGINE
 	help
 	help
 	  Enable support for the Renesas SuperH DMA controllers.
 	  Enable support for the Renesas SuperH DMA controllers.
 
 
+#
+# DMA Controllers
+#
+
 config SH_DMAE
 config SH_DMAE
 	tristate "Renesas SuperH DMAC support"
 	tristate "Renesas SuperH DMAC support"
 	depends on SH_DMAE_BASE
 	depends on SH_DMAE_BASE
 	help
 	help
 	  Enable support for the Renesas SuperH DMA controllers.
 	  Enable support for the Renesas SuperH DMA controllers.
 
 
+if SH_DMAE
+
+config SH_DMAE_R8A73A4
+	def_bool y
+	depends on ARCH_R8A73A4
+	depends on OF
+
+endif
+
 config SUDMAC
 config SUDMAC
 	tristate "Renesas SUDMAC support"
 	tristate "Renesas SUDMAC support"
 	depends on SH_DMAE_BASE
 	depends on SH_DMAE_BASE
@@ -34,7 +52,3 @@ config RCAR_AUDMAC_PP
 	depends on SH_DMAE_BASE
 	depends on SH_DMAE_BASE
 	help
 	help
 	  Enable support for the Renesas R-Car Audio DMAC Peripheral Peripheral controllers.
 	  Enable support for the Renesas R-Car Audio DMAC Peripheral Peripheral controllers.
-
-config SHDMA_R8A73A4
-	def_bool y
-	depends on ARCH_R8A73A4 && SH_DMAE != n

+ 12 - 4
drivers/dma/sh/Makefile

@@ -1,10 +1,18 @@
+#
+# DMA Engine Helpers
+#
+
 obj-$(CONFIG_SH_DMAE_BASE) += shdma-base.o shdma-of.o
 obj-$(CONFIG_SH_DMAE_BASE) += shdma-base.o shdma-of.o
-obj-$(CONFIG_SH_DMAE) += shdma.o
+
+#
+# DMA Controllers
+#
+
 shdma-y := shdmac.o
 shdma-y := shdmac.o
-ifeq ($(CONFIG_OF),y)
-shdma-$(CONFIG_SHDMA_R8A73A4) += shdma-r8a73a4.o
-endif
+shdma-$(CONFIG_SH_DMAE_R8A73A4) += shdma-r8a73a4.o
 shdma-objs := $(shdma-y)
 shdma-objs := $(shdma-y)
+obj-$(CONFIG_SH_DMAE) += shdma.o
+
 obj-$(CONFIG_SUDMAC) += sudmac.o
 obj-$(CONFIG_SUDMAC) += sudmac.o
 obj-$(CONFIG_RCAR_HPB_DMAE) += rcar-hpbdma.o
 obj-$(CONFIG_RCAR_HPB_DMAE) += rcar-hpbdma.o
 obj-$(CONFIG_RCAR_AUDMAC_PP) += rcar-audmapp.o
 obj-$(CONFIG_RCAR_AUDMAC_PP) += rcar-audmapp.o

+ 1 - 1
drivers/dma/sh/shdma.h

@@ -62,7 +62,7 @@ struct sh_dmae_desc {
 #define to_sh_dev(chan) container_of(chan->shdma_chan.dma_chan.device,\
 #define to_sh_dev(chan) container_of(chan->shdma_chan.dma_chan.device,\
 				     struct sh_dmae_device, shdma_dev.dma_dev)
 				     struct sh_dmae_device, shdma_dev.dma_dev)
 
 
-#ifdef CONFIG_SHDMA_R8A73A4
+#ifdef CONFIG_SH_DMAE_R8A73A4
 extern const struct sh_dmae_pdata r8a73a4_dma_pdata;
 extern const struct sh_dmae_pdata r8a73a4_dma_pdata;
 #define r8a73a4_shdma_devid (&r8a73a4_dma_pdata)
 #define r8a73a4_shdma_devid (&r8a73a4_dma_pdata)
 #else
 #else