Skip to content

Commit 48cb635

Browse files
Akhil Rwsakernel
authored andcommitted
i2c: tegra: Add GPCDMA support
Enable support for GPCDMA, which is used in I2C controllers in Tegra 186 and above. The chips before that used APB DMA. This change works under the presumption that all chips apart from those supporting APB DMA is using GPCDMA. Signed-off-by: Akhil R <[email protected]> Reviewed-by: Dmitry Osipenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 03d4287 commit 48cb635

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/i2c/busses/i2c-tegra.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,16 @@ static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev)
443443
u32 *dma_buf;
444444
int err;
445445

446-
if (!i2c_dev->hw->has_apb_dma || i2c_dev->is_vi)
446+
if (i2c_dev->is_vi)
447447
return 0;
448448

449-
if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {
450-
dev_dbg(i2c_dev->dev, "DMA support not enabled\n");
449+
if (!i2c_dev->hw->has_apb_dma) {
450+
if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {
451+
dev_dbg(i2c_dev->dev, "APB DMA support not enabled\n");
452+
return 0;
453+
}
454+
} else if (!IS_ENABLED(CONFIG_TEGRA186_GPC_DMA)) {
455+
dev_dbg(i2c_dev->dev, "GPC DMA support not enabled\n");
451456
return 0;
452457
}
453458

0 commit comments

Comments
 (0)