Lines Matching full:smmu

19 #include "arm-smmu.h"
20 #include "arm-smmu-qcom.h"
59 static struct qcom_smmu *to_qcom_smmu(struct arm_smmu_device *smmu) in to_qcom_smmu() argument
61 return container_of(smmu, struct qcom_smmu, smmu); in to_qcom_smmu()
64 void qcom_smmu_tlb_sync_debug(struct arm_smmu_device *smmu) in qcom_smmu_tlb_sync_debug() argument
68 struct qcom_smmu *qsmmu = container_of(smmu, struct qcom_smmu, smmu); in qcom_smmu_tlb_sync_debug()
74 dev_err(smmu->dev, "TLB sync timed out -- SMMU may be deadlocked\n"); in qcom_smmu_tlb_sync_debug()
80 ret = qcom_scm_io_readl(smmu->ioaddr + cfg->reg_offset[QCOM_SMMU_TBU_PWR_STATUS], in qcom_smmu_tlb_sync_debug()
83 dev_err(smmu->dev, in qcom_smmu_tlb_sync_debug()
86 ret = qcom_scm_io_readl(smmu->ioaddr + cfg->reg_offset[QCOM_SMMU_STATS_SYNC_INV_TBU_ACK], in qcom_smmu_tlb_sync_debug()
89 dev_err(smmu->dev, in qcom_smmu_tlb_sync_debug()
92 ret = qcom_scm_io_readl(smmu->ioaddr + cfg->reg_offset[QCOM_SMMU_MMU2QSS_AND_SAFE_WAIT_CNTR], in qcom_smmu_tlb_sync_debug()
95 dev_err(smmu->dev, in qcom_smmu_tlb_sync_debug()
98 dev_err(smmu->dev, in qcom_smmu_tlb_sync_debug()
118 if (qsmmu->smmu.dev->of_node == tbu->smmu_np && in qcom_find_tbu()
122 dev_err(qsmmu->smmu.dev, "Unable to find TBU for sid 0x%x\n", sid); in qcom_find_tbu()
129 struct arm_smmu_device *smmu = smmu_domain->smmu; in qcom_tbu_halt() local
143 fsr = arm_smmu_cb_read(smmu, idx, ARM_SMMU_CB_FSR); in qcom_tbu_halt()
153 sctlr_orig = arm_smmu_cb_read(smmu, idx, ARM_SMMU_CB_SCTLR); in qcom_tbu_halt()
155 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_SCTLR, sctlr); in qcom_tbu_halt()
156 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_FSR, fsr); in qcom_tbu_halt()
157 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_RESUME, ARM_SMMU_RESUME_TERMINATE); in qcom_tbu_halt()
158 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_SCTLR, sctlr_orig); in qcom_tbu_halt()
266 struct arm_smmu_device *smmu = smmu_domain->smmu; in qcom_iova_to_phys() local
267 struct qcom_smmu *qsmmu = to_qcom_smmu(smmu); in qcom_iova_to_phys()
296 sctlr_orig = arm_smmu_cb_read(smmu, idx, ARM_SMMU_CB_SCTLR); in qcom_iova_to_phys()
298 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_SCTLR, sctlr); in qcom_iova_to_phys()
300 fsr = arm_smmu_cb_read(smmu, idx, ARM_SMMU_CB_FSR); in qcom_iova_to_phys()
303 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_FSR, fsr); in qcom_iova_to_phys()
310 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_RESUME, in qcom_iova_to_phys()
322 fsr = arm_smmu_cb_read(smmu, idx, ARM_SMMU_CB_FSR); in qcom_iova_to_phys()
325 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_FSR, fsr); in qcom_iova_to_phys()
328 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_RESUME, in qcom_iova_to_phys()
333 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_SCTLR, sctlr_orig); in qcom_iova_to_phys()
350 struct arm_smmu_device *smmu = smmu_domain->smmu; in qcom_smmu_iova_to_phys_hard() local
355 frsynra = arm_smmu_gr1_read(smmu, ARM_SMMU_GR1_CBFRSYNRA(idx)); in qcom_smmu_iova_to_phys_hard()
364 struct arm_smmu_device *smmu = smmu_domain->smmu; in qcom_smmu_verify_fault() local
373 dev_err(smmu->dev, in qcom_smmu_verify_fault()
385 struct arm_smmu_device *smmu = smmu_domain->smmu; in qcom_smmu_context_fault() local
396 arm_smmu_read_context_fault_info(smmu, idx, &cfi); in qcom_smmu_context_fault()
406 arm_smmu_print_context_fault_info(smmu, idx, &cfi); in qcom_smmu_context_fault()
408 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_FSR, cfi.fsr); in qcom_smmu_context_fault()
423 arm_smmu_print_context_fault_info(smmu, idx, &cfi); in qcom_smmu_context_fault()
425 dev_err(smmu->dev, in qcom_smmu_context_fault()
428 dev_err(smmu->dev, in qcom_smmu_context_fault()
430 dev_name(smmu->dev)); in qcom_smmu_context_fault()
432 dev_err(smmu->dev, "hard iova-to-phys (ATOS)=%pa\n", in qcom_smmu_context_fault()
435 dev_err(smmu->dev, "hard iova-to-phys (ATOS) failed\n"); in qcom_smmu_context_fault()
457 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_FSR, cfi.fsr); in qcom_smmu_context_fault()
461 arm_smmu_cb_write(smmu, idx, ARM_SMMU_CB_RESUME, resume); in qcom_smmu_context_fault()