linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: tegra: fix broken 'select' statement
@ 2020-04-08 20:04 Arnd Bergmann
  2020-04-08 21:37 ` Stephen Warren
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2020-04-08 20:04 UTC (permalink / raw)
  To: Vinod Koul, Thierry Reding, Jonathan Hunter
  Cc: Arnd Bergmann, Dan Williams, dmaengine, linux-kernel, linux-tegra

A SoC driver selects the dmaengine driver for the platform it
is made for, leading to Kconfig warnings in some configurations:

WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
  Depends on [n]: DMADEVICES [=n] && (ARCH_TEGRA [=y] || COMPILE_TEST [=y])
  Selected by [y]:
  - SOC_TEGRA_FUSE [=y] && ARCH_TEGRA [=y] && ARCH_TEGRA_2x_SOC [=y]

WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
  Depends on [n]: DMADEVICES [=n] && (ARCH_TEGRA [=y] || COMPILE_TEST [=y])
  Selected by [y]:
  - SOC_TEGRA_FUSE [=y] && ARCH_TEGRA [=y] && ARCH_TEGRA_2x_SOC [=y]

Generally, no driver should 'select' a driver from a different subsystem,
especially when there is no build-time dependency between the two.

Remove the bogus 'select' and instead change the dmaengine driver to
be default-enabled in this configuration, to let existing defconfig
files continue working.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/dma/Kconfig       | 1 +
 drivers/soc/tegra/Kconfig | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 023db6883d05..c19e25b140c5 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -619,6 +619,7 @@ config TXX9_DMAC
 config TEGRA20_APB_DMA
 	tristate "NVIDIA Tegra20 APB DMA support"
 	depends on ARCH_TEGRA || COMPILE_TEST
+	default SOC_TEGRA_FUSE && ARCH_TEGRA_2x_SOC
 	select DMA_ENGINE
 	help
 	  Support for the NVIDIA Tegra20 APB DMA controller driver. The
diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig
index 3693532949b8..84bd615c4a92 100644
--- a/drivers/soc/tegra/Kconfig
+++ b/drivers/soc/tegra/Kconfig
@@ -126,7 +126,6 @@ config SOC_TEGRA_FUSE
 	def_bool y
 	depends on ARCH_TEGRA
 	select SOC_BUS
-	select TEGRA20_APB_DMA if ARCH_TEGRA_2x_SOC
 
 config SOC_TEGRA_FLOWCTRL
 	bool
-- 
2.26.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: tegra: fix broken 'select' statement
  2020-04-08 20:04 [PATCH] dmaengine: tegra: fix broken 'select' statement Arnd Bergmann
@ 2020-04-08 21:37 ` Stephen Warren
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2020-04-08 21:37 UTC (permalink / raw)
  To: Arnd Bergmann, Vinod Koul, Thierry Reding, Jonathan Hunter
  Cc: Dan Williams, dmaengine, linux-kernel, linux-tegra

On 4/8/20 2:04 PM, Arnd Bergmann wrote:
> A SoC driver selects the dmaengine driver for the platform it
> is made for, leading to Kconfig warnings in some configurations:
> 
> WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
>   Depends on [n]: DMADEVICES [=n] && (ARCH_TEGRA [=y] || COMPILE_TEST [=y])
>   Selected by [y]:
>   - SOC_TEGRA_FUSE [=y] && ARCH_TEGRA [=y] && ARCH_TEGRA_2x_SOC [=y]
> 
> WARNING: unmet direct dependencies detected for TEGRA20_APB_DMA
>   Depends on [n]: DMADEVICES [=n] && (ARCH_TEGRA [=y] || COMPILE_TEST [=y])
>   Selected by [y]:
>   - SOC_TEGRA_FUSE [=y] && ARCH_TEGRA [=y] && ARCH_TEGRA_2x_SOC [=y]
> 
> Generally, no driver should 'select' a driver from a different subsystem,
> especially when there is no build-time dependency between the two.

IIRC there's a run-time dependency between the two though; without the
DMA driver available to implement a HW WAR, the fuse driver has to
access fuse registers directly which IIRC can cause a lock-up, or
something like that. So I think allowing APD_DMA to be deselected by the
user is wrong for T20 at least; it simply must be enabled. Perhaps
ARCH_TEGRA_2x_SOC should select it instead?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-08 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 20:04 [PATCH] dmaengine: tegra: fix broken 'select' statement Arnd Bergmann
2020-04-08 21:37 ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).