Commit ce7fc8e7 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski

Merge branch 'for-thierry/arm-smmu' of...

Merge branch 'for-thierry/arm-smmu' of https://git.kernel.org/pub/scm/linux/kernel/git/will/linux into for-v5.14/tegra-mc

Pull ARM SMMU driver change from Will Deacon to resolve dependencies
between memory controllers, Tegra ARM SoC and ARM SMMU drivers trees.

Further ARM SMMU changes for Tegra depend on the change in Will's tree
and on Tegra memory controllers drivers work done before by Thierry
Reding.  Pulling Will's tree allows to apply the rest of this ARM SMMU
Tegra work via memory controllers drivers tree.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
parents c7c65703 0d97174a
...@@ -1450,6 +1450,18 @@ static void arm_smmu_release_device(struct device *dev) ...@@ -1450,6 +1450,18 @@ static void arm_smmu_release_device(struct device *dev)
iommu_fwspec_free(dev); iommu_fwspec_free(dev);
} }
static void arm_smmu_probe_finalize(struct device *dev)
{
struct arm_smmu_master_cfg *cfg;
struct arm_smmu_device *smmu;
cfg = dev_iommu_priv_get(dev);
smmu = cfg->smmu;
if (smmu->impl->probe_finalize)
smmu->impl->probe_finalize(smmu, dev);
}
static struct iommu_group *arm_smmu_device_group(struct device *dev) static struct iommu_group *arm_smmu_device_group(struct device *dev)
{ {
struct arm_smmu_master_cfg *cfg = dev_iommu_priv_get(dev); struct arm_smmu_master_cfg *cfg = dev_iommu_priv_get(dev);
...@@ -1569,6 +1581,7 @@ static struct iommu_ops arm_smmu_ops = { ...@@ -1569,6 +1581,7 @@ static struct iommu_ops arm_smmu_ops = {
.iova_to_phys = arm_smmu_iova_to_phys, .iova_to_phys = arm_smmu_iova_to_phys,
.probe_device = arm_smmu_probe_device, .probe_device = arm_smmu_probe_device,
.release_device = arm_smmu_release_device, .release_device = arm_smmu_release_device,
.probe_finalize = arm_smmu_probe_finalize,
.device_group = arm_smmu_device_group, .device_group = arm_smmu_device_group,
.enable_nesting = arm_smmu_enable_nesting, .enable_nesting = arm_smmu_enable_nesting,
.set_pgtable_quirks = arm_smmu_set_pgtable_quirks, .set_pgtable_quirks = arm_smmu_set_pgtable_quirks,
......
...@@ -439,6 +439,7 @@ struct arm_smmu_impl { ...@@ -439,6 +439,7 @@ struct arm_smmu_impl {
struct device *dev, int start); struct device *dev, int start);
void (*write_s2cr)(struct arm_smmu_device *smmu, int idx); void (*write_s2cr)(struct arm_smmu_device *smmu, int idx);
void (*write_sctlr)(struct arm_smmu_device *smmu, int idx, u32 reg); void (*write_sctlr)(struct arm_smmu_device *smmu, int idx, u32 reg);
void (*probe_finalize)(struct arm_smmu_device *smmu, struct device *dev);
}; };
#define INVALID_SMENDX -1 #define INVALID_SMENDX -1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment