Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iommu/arm-smmu-v3: Add device-tree support for CMDQV driver

Add device tree support to the CMDQV driver to enable usage on Tegra264
SoCs. The implementation parses the nvidia,cmdqv phandle from the SMMU
device tree node to associate each SMMU with its corresponding CMDQV
instance based on compatible string.

Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Ashish Mhetre <amhetre@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Ashish Mhetre and committed by
Will Deacon
ea69dc4e eb20758f

+32
+32
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
··· 4533 4533 return 0; 4534 4534 } 4535 4535 4536 + #ifdef CONFIG_TEGRA241_CMDQV 4537 + static void tegra_cmdqv_dt_probe(struct device_node *smmu_node, 4538 + struct arm_smmu_device *smmu) 4539 + { 4540 + struct platform_device *pdev; 4541 + struct device_node *np; 4542 + 4543 + np = of_parse_phandle(smmu_node, "nvidia,cmdqv", 0); 4544 + if (!np) 4545 + return; 4546 + 4547 + /* Tegra241 CMDQV driver is responsible for put_device() */ 4548 + pdev = of_find_device_by_node(np); 4549 + of_node_put(np); 4550 + if (!pdev) 4551 + return; 4552 + 4553 + smmu->impl_dev = &pdev->dev; 4554 + smmu->options |= ARM_SMMU_OPT_TEGRA241_CMDQV; 4555 + dev_dbg(smmu->dev, "found companion CMDQV device: %s\n", 4556 + dev_name(smmu->impl_dev)); 4557 + } 4558 + #else 4559 + static void tegra_cmdqv_dt_probe(struct device_node *smmu_node, 4560 + struct arm_smmu_device *smmu) 4561 + { 4562 + } 4563 + #endif 4564 + 4536 4565 #ifdef CONFIG_ACPI 4537 4566 #ifdef CONFIG_TEGRA241_CMDQV 4538 4567 static void acpi_smmu_dsdt_probe_tegra241_cmdqv(struct acpi_iort_node *node, ··· 4666 4637 4667 4638 if (of_dma_is_coherent(dev->of_node)) 4668 4639 smmu->features |= ARM_SMMU_FEAT_COHERENCY; 4640 + 4641 + if (of_device_is_compatible(dev->of_node, "nvidia,tegra264-smmu")) 4642 + tegra_cmdqv_dt_probe(dev->of_node, smmu); 4669 4643 4670 4644 return ret; 4671 4645 }