Skip to content

Commit 27ec43c

Browse files
pnewman-ctiwsakernel
authored andcommitted
i2c: tegra: Fix i2c-tegra DMA config option processing
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: 48cb635 ("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>
1 parent b3497ef commit 27ec43c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-tegra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev)
442442
if (IS_VI(i2c_dev))
443443
return 0;
444444

445-
if (!i2c_dev->hw->has_apb_dma) {
445+
if (i2c_dev->hw->has_apb_dma) {
446446
if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {
447447
dev_dbg(i2c_dev->dev, "APB DMA support not enabled\n");
448448
return 0;

0 commit comments

Comments
 (0)