iommu/tegra: Add tegra_dev_iommu_get_stream_id() helper
authorThierry Reding <treding@nvidia.com>
Tue, 6 Dec 2022 16:59:41 +0000 (17:59 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 7 Dec 2022 12:30:24 +0000 (13:30 +0100)
commit493c9b68d1d8765b2f8740a06c169e90a947159f
tree7ff31733deb00660e675cd1e46e69466b61d445b
parent495b637f640b7f87ab42f3cc829e35ea76a1f3eb
iommu/tegra: Add tegra_dev_iommu_get_stream_id() helper

Access to the internals of struct iommu_fwspec by non-IOMMU drivers is
discouraged. Many drivers for Tegra SoCs, however, need access to their
IOMMU stream IDs so that they can be programmed into various hardware
registers.

Formalize this access into a common helper to make it easier to audit
and maintain.

Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20221206165945.3551774-3-thierry.reding@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
include/linux/iommu.h