Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Laurent Pinchart and committed by
Vinod Koul
9f2c2bb3 4fbd804e

+32 -10
+19 -5
drivers/dma/sh/Kconfig
··· 2 2 # DMA engine configuration for sh 3 3 # 4 4 5 + # 6 + # DMA Engine Helpers 7 + # 8 + 5 9 config SH_DMAE_BASE 6 10 bool "Renesas SuperH DMA Engine support" 7 - depends on (SUPERH && SH_DMA) || ARCH_SHMOBILE || COMPILE_TEST 11 + depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST 12 + depends on !SUPERH || SH_DMA 8 13 depends on !SH_DMA_API 9 14 default y 10 15 select DMA_ENGINE 11 16 help 12 17 Enable support for the Renesas SuperH DMA controllers. 13 18 19 + # 20 + # DMA Controllers 21 + # 22 + 14 23 config SH_DMAE 15 24 tristate "Renesas SuperH DMAC support" 16 25 depends on SH_DMAE_BASE 17 26 help 18 27 Enable support for the Renesas SuperH DMA controllers. 28 + 29 + if SH_DMAE 30 + 31 + config SH_DMAE_R8A73A4 32 + def_bool y 33 + depends on ARCH_R8A73A4 34 + depends on OF 35 + 36 + endif 19 37 20 38 config SUDMAC 21 39 tristate "Renesas SUDMAC support" ··· 52 34 depends on SH_DMAE_BASE 53 35 help 54 36 Enable support for the Renesas R-Car Audio DMAC Peripheral Peripheral controllers. 55 - 56 - config SHDMA_R8A73A4 57 - def_bool y 58 - depends on ARCH_R8A73A4 && SH_DMAE != n
+12 -4
drivers/dma/sh/Makefile
··· 1 + # 2 + # DMA Engine Helpers 3 + # 4 + 1 5 obj-$(CONFIG_SH_DMAE_BASE) += shdma-base.o shdma-of.o 2 - obj-$(CONFIG_SH_DMAE) += shdma.o 6 + 7 + # 8 + # DMA Controllers 9 + # 10 + 3 11 shdma-y := shdmac.o 4 - ifeq ($(CONFIG_OF),y) 5 - shdma-$(CONFIG_SHDMA_R8A73A4) += shdma-r8a73a4.o 6 - endif 12 + shdma-$(CONFIG_SH_DMAE_R8A73A4) += shdma-r8a73a4.o 7 13 shdma-objs := $(shdma-y) 14 + obj-$(CONFIG_SH_DMAE) += shdma.o 15 + 8 16 obj-$(CONFIG_SUDMAC) += sudmac.o 9 17 obj-$(CONFIG_RCAR_HPB_DMAE) += rcar-hpbdma.o 10 18 obj-$(CONFIG_RCAR_AUDMAC_PP) += rcar-audmapp.o
+1 -1
drivers/dma/sh/shdma.h
··· 62 62 #define to_sh_dev(chan) container_of(chan->shdma_chan.dma_chan.device,\ 63 63 struct sh_dmae_device, shdma_dev.dma_dev) 64 64 65 - #ifdef CONFIG_SHDMA_R8A73A4 65 + #ifdef CONFIG_SH_DMAE_R8A73A4 66 66 extern const struct sh_dmae_pdata r8a73a4_dma_pdata; 67 67 #define r8a73a4_shdma_devid (&r8a73a4_dma_pdata) 68 68 #else