]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
i2c: tegra: Fix i2c-tegra DMA config option processing
authorParker Newman <pnewman@connecttech.com>
Tue, 8 Aug 2023 14:01:06 +0000 (16:01 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 30 Oct 2023 11:00:15 +0000 (12:00 +0100)
commit914fc7f6a68b6d686211b7161ead4eb3129448a6
tree9666a32cc5f897c152cbc9fdd00f0edd1e804a15
parent6eaf18cc8d6d258c0a50124c0fdd08fdb4f5fe78
i2c: tegra: Fix i2c-tegra DMA config option processing

BugLink: https://bugs.launchpad.net/bugs/2039110
commit 27ec43c77b5db780a56fc3a6d6de6bf2f74614f7 upstream.

Tegra processors prior to Tegra186 used APB DMA for I2C requiring
CONFIG_TEGRA20_APB_DMA=y while Tegra186 and later use GPC DMA requiring
CONFIG_TEGRA186_GPC_DMA=y.

The check for if the processor uses APB DMA is inverted and so the wrong
DMA config options are checked.

This means if CONFIG_TEGRA20_APB_DMA=y but CONFIG_TEGRA186_GPC_DMA=n
with a Tegra186 or later processor the driver will incorrectly think DMA is
enabled and attempt to request DMA channels that will never be availible,
leaving the driver in a perpetual EPROBE_DEFER state.

Fixes: 48cb6356fae1 ("i2c: tegra: Add GPCDMA support")
Signed-off-by: Parker Newman <pnewman@connecttech.com>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Acked-by: Akhil R <akhilrajeev@nvidia.com>
Link: https://lore.kernel.org/r/fcfcf9b3-c8c4-9b34-2ff8-cd60a3d490bd@connecttech.com
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/i2c/busses/i2c-tegra.c