diff options
author | Jean-Philippe Brucker <jean-philippe@linaro.org> | 2020-01-15 15:52:29 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-01-15 19:00:57 +0300 |
commit | 89535821c04256964e266bf585cf224f65e08983 (patch) | |
tree | fe81d533c592dcdf302e2c997f6cebebc114d060 /drivers/iommu/of_iommu.c | |
parent | 2e981b9468e670b76bd1048fa939ad1f9653bd79 (diff) | |
download | linux-89535821c04256964e266bf585cf224f65e08983.tar.xz |
iommu/arm-smmu-v3: Parse PASID devicetree property of platform devices
For platform devices that support SubstreamID (SSID), firmware provides
the number of supported SSID bits. Restrict it to what the SMMU supports
and cache it into master->ssid_bits, which will also be used for PCI
PASID.
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/iommu/of_iommu.c')
-rw-r--r-- | drivers/iommu/of_iommu.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index e7bc8b721947..20738aacac89 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c @@ -203,8 +203,12 @@ const struct iommu_ops *of_iommu_configure(struct device *dev, if (err) break; } - } + fwspec = dev_iommu_fwspec_get(dev); + if (!err && fwspec) + of_property_read_u32(master_np, "pasid-num-bits", + &fwspec->num_pasid_bits); + } /* * Two success conditions can be represented by non-negative err here: |