Lines Matching full:smmu
15 #include "arm-smmu-v3.h"
109 "This allows to disable CMDQV HW and use default SMMU internal CMDQ.");
164 * @smmu: SMMUv3 device
175 struct arm_smmu_device smmu; member
268 __arm_smmu_cmdq_skip_err(&vintf->cmdqv->smmu, &vcmdq->cmdq); in tegra241_vintf0_handle_error()
319 tegra241_cmdqv_get_cmdq(struct arm_smmu_device *smmu, in tegra241_cmdqv_get_cmdq() argument
323 container_of(smmu, struct tegra241_cmdqv, smmu); in tegra241_cmdqv_get_cmdq()
331 /* Use SMMU CMDQ if VINTF0 is uninitialized */ in tegra241_cmdqv_get_cmdq()
347 /* Unsupported CMD goes for smmu->cmdq pathway */ in tegra241_cmdqv_get_cmdq()
458 static int tegra241_cmdqv_hw_reset(struct arm_smmu_device *smmu) in tegra241_cmdqv_hw_reset() argument
461 container_of(smmu, struct tegra241_cmdqv, smmu); in tegra241_cmdqv_hw_reset()
499 dmam_free_coherent(vcmdq->cmdqv->smmu.dev, qsz, q->base, q->base_dma); in tegra241_vcmdq_free_smmu_cmdq()
504 struct arm_smmu_device *smmu = &vcmdq->cmdqv->smmu; in tegra241_vcmdq_alloc_smmu_cmdq() local
515 ret = arm_smmu_init_one_queue(smmu, q, vcmdq->page0, in tegra241_vcmdq_alloc_smmu_cmdq()
528 return arm_smmu_cmdq_init(smmu, cmdq); in tegra241_vcmdq_alloc_smmu_cmdq()
662 static void tegra241_cmdqv_remove(struct arm_smmu_device *smmu) in tegra241_cmdqv_remove() argument
665 container_of(smmu, struct tegra241_cmdqv, smmu); in tegra241_cmdqv_remove()
684 put_device(cmdqv->dev); /* smmu->impl_dev */ in tegra241_cmdqv_remove()
758 static int tegra241_cmdqv_init_structures(struct arm_smmu_device *smmu) in tegra241_cmdqv_init_structures() argument
761 container_of(smmu, struct tegra241_cmdqv, smmu); in tegra241_cmdqv_init_structures()
787 smmu->impl_ops = &tegra241_cmdqv_impl_ops; in tegra241_cmdqv_init_structures()
797 dev_info(smmu->impl_dev, "Falling back to standard SMMU CMDQ\n"); in tegra241_cmdqv_init_structures()
798 smmu->options &= ~ARM_SMMU_OPT_TEGRA241_CMDQV; in tegra241_cmdqv_init_structures()
799 tegra241_cmdqv_remove(smmu); in tegra241_cmdqv_init_structures()
806 __tegra241_cmdqv_probe(struct arm_smmu_device *smmu, struct resource *res, in __tegra241_cmdqv_probe() argument
819 static_assert(offsetof(struct tegra241_cmdqv, smmu) == 0); in __tegra241_cmdqv_probe()
823 dev_err(smmu->dev, "failed to ioremap\n"); in __tegra241_cmdqv_probe()
829 dev_info(smmu->dev, "Detected disable_cmdqv=true\n"); in __tegra241_cmdqv_probe()
834 cmdqv = devm_krealloc(smmu->dev, smmu, sizeof(*cmdqv), GFP_KERNEL); in __tegra241_cmdqv_probe()
837 new_smmu = &cmdqv->smmu; in __tegra241_cmdqv_probe()
841 cmdqv->dev = smmu->impl_dev; in __tegra241_cmdqv_probe()
887 struct arm_smmu_device *tegra241_cmdqv_probe(struct arm_smmu_device *smmu) in tegra241_cmdqv_probe() argument
893 if (!smmu->dev->of_node) in tegra241_cmdqv_probe()
894 res = tegra241_cmdqv_find_acpi_resource(smmu->impl_dev, &irq); in tegra241_cmdqv_probe()
898 new_smmu = __tegra241_cmdqv_probe(smmu, res, irq); in tegra241_cmdqv_probe()
905 dev_info(smmu->impl_dev, "Falling back to standard SMMU CMDQ\n"); in tegra241_cmdqv_probe()
906 smmu->options &= ~ARM_SMMU_OPT_TEGRA241_CMDQV; in tegra241_cmdqv_probe()
907 put_device(smmu->impl_dev); in tegra241_cmdqv_probe()