Re: [PATCH] dmaengine: tegra: fix broken 'select' statement

From: Stephen Warren
Date: Wed Apr 08 2020 - 17:37:40 EST


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?