Lines Matching +full:mmu +full:- +full:500
1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (C) 2019-2020 NVIDIA CORPORATION. All rights reserved.
10 #include "arm-smmu.h"
13 * Tegra194 has three ARM MMU-500 Instances.
16 * non-isochronous HW devices.
20 * The third instance usage is through standard arm-smmu driver itself and
36 return nvidia_smmu->bases[inst] + (page << smmu->pgshift); in nvidia_smmu_page()
89 for (spin_cnt = TLB_SPIN_COUNT; spin_cnt > 0; spin_cnt--) { in nvidia_smmu_tlb_sync()
109 dev_err_ratelimited(smmu->dev, in nvidia_smmu_tlb_sync()
110 "TLB sync timed out -- SMMU may be deadlocked\n"); in nvidia_smmu_tlb_sync()
145 dev_err_ratelimited(smmu->dev, in nvidia_smmu_global_fault_inst()
147 dev_err_ratelimited(smmu->dev, in nvidia_smmu_global_fault_inst()
179 void __iomem *cb_base = nvidia_smmu_page(smmu, inst, smmu->numpage + idx); in nvidia_smmu_context_fault_bank()
189 dev_err_ratelimited(smmu->dev, in nvidia_smmu_context_fault_bank()
207 smmu = smmu_domain->smmu; in nvidia_smmu_context_fault()
216 for (idx = 0; idx < smmu->num_context_banks; idx++) { in nvidia_smmu_context_fault()
241 struct device *dev = smmu->dev; in nvidia_smmu_impl_init()
247 return ERR_PTR(-ENOMEM); in nvidia_smmu_impl_init()
251 * arm-smmu.c. The smmu from struct nvidia_smmu replaces the smmu in nvidia_smmu_impl_init()
252 * pointer used in arm-smmu.c once this function returns. in nvidia_smmu_impl_init()
256 nvidia_smmu->smmu = *smmu; in nvidia_smmu_impl_init()
257 /* Instance 0 is ioremapped by arm-smmu.c. */ in nvidia_smmu_impl_init()
258 nvidia_smmu->bases[0] = smmu->base; in nvidia_smmu_impl_init()
262 return ERR_PTR(-ENODEV); in nvidia_smmu_impl_init()
264 nvidia_smmu->bases[1] = devm_ioremap_resource(dev, res); in nvidia_smmu_impl_init()
265 if (IS_ERR(nvidia_smmu->bases[1])) in nvidia_smmu_impl_init()
266 return ERR_CAST(nvidia_smmu->bases[1]); in nvidia_smmu_impl_init()
268 nvidia_smmu->smmu.impl = &nvidia_smmu_impl; in nvidia_smmu_impl_init()
271 * Free the struct arm_smmu_device *smmu allocated in arm-smmu.c. in nvidia_smmu_impl_init()
272 * Once this function returns, arm-smmu.c would use arm_smmu_device in nvidia_smmu_impl_init()
277 return &nvidia_smmu->smmu; in nvidia_smmu_impl_init()