i2c: tegra: Allocate DMA memory for DMA engine
authorThierry Reding <treding@nvidia.com>
Thu, 20 Oct 2022 14:39:33 +0000 (16:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 16:45:40 +0000 (17:45 +0100)
commit959cb0fd6951406da4d25fd756a2c061bf89e88d
tree8560523454ef6bddded12162eb079fbcc525e966
parent6cb657722e37561202194bb52ba387a82572ac3f
i2c: tegra: Allocate DMA memory for DMA engine

[ Upstream commit cdbf26251d3b35c4ccaea0c3a6de4318f727d3d2 ]

When the I2C controllers are running in DMA mode, it is the DMA engine
that performs the memory accesses rather than the I2C controller. Pass
the DMA engine's struct device pointer to the DMA API to make sure the
correct DMA operations are used.

This fixes an issue where the DMA engine's SMMU stream ID needs to be
misleadingly set for the I2C controllers in device tree.

Suggested-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-tegra.c