iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev
authorNicolin Chen <nicoleotsuka@gmail.com>
Wed, 25 Nov 2020 10:10:11 +0000 (02:10 -0800)
committerWill Deacon <will@kernel.org>
Wed, 25 Nov 2020 11:04:41 +0000 (11:04 +0000)
commit8750d207dc98d5f743c28ae41d50ebf8887a2106
treef04cfe7bffdb61edaa286570e867c5728873adbe
parentd5f583bf8654c231b781096bc1a186065cda72b3
iommu/tegra-smmu: Use fwspec in tegra_smmu_(de)attach_dev

In tegra_smmu_(de)attach_dev() functions, we poll DTB for each
client's iommus property to get swgroup ID in order to prepare
"as" and enable smmu. Actually tegra_smmu_configure() prepared
an fwspec for each client, and added to the fwspec all swgroup
IDs of client DT node in DTB.

So this patch uses fwspec in tegra_smmu_(de)attach_dev() so as
to replace the redundant DT polling code.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20201125101013.14953-4-nicoleotsuka@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/tegra-smmu.c