diff mbox series

[RFC,v5,05/14] i2c: tegra: Avoid tegra_i2c_init_dma() for Tegra210 vi i2c

Message ID 1595883452-17343-6-git-send-email-skomatineni@nvidia.com (mailing list archive)
State New, archived
Headers show
Series Support for Tegra video capture from external sensor | expand

Commit Message

Sowjanya Komatineni July 27, 2020, 8:57 p.m. UTC
VI I2C is on host1x bus so APB DMA can't be used for Tegra210 VI
I2C and there are no tx and rx dma channels for VI I2C.

So, avoid attempt of requesting DMA channels.

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
---
 drivers/i2c/busses/i2c-tegra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Wolfram Sang July 28, 2020, 4:34 p.m. UTC | #1
On Mon, Jul 27, 2020 at 01:57:23PM -0700, Sowjanya Komatineni wrote:
> VI I2C is on host1x bus so APB DMA can't be used for Tegra210 VI
> I2C and there are no tx and rx dma channels for VI I2C.
> 
> So, avoid attempt of requesting DMA channels.
> 
> Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 1bf3666..00d3e4d 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -421,7 +421,7 @@  static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev)
 	dma_addr_t dma_phys;
 	int err;
 
-	if (!i2c_dev->hw->has_apb_dma)
+	if (!i2c_dev->hw->has_apb_dma || i2c_dev->is_vi)
 		return 0;
 
 	if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {