Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328770

[PATCH v2 2/4] iommu/arm-smmu: Invoke DT probe from arm_smmu_of_setup()

From Anup Patel <anup.patel@broadcom.com>
Newsgroups linux.kernel
Subject [PATCH v2 2/4] iommu/arm-smmu: Invoke DT probe from arm_smmu_of_setup()
Date 2016-02-08 06:30 +0100
Message-ID <qZMyC-C9-3@gated-at.bofh.it> (permalink)
References <qZMyC-C9-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The SMMUv1/SMMUv2 driver is initialized very early using the
IOMMU_OF_DECLARE() but the actual platform device is probed
via normal DT probing.

This patch uses of_platform_device_create() from arm_smmu_of_setup()
to ensure that SMMU platform device is probed immediately.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
---
 drivers/iommu/arm-smmu.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 2c8f871..02cd67d 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -40,6 +40,7 @@
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_iommu.h>
+#include <linux/of_platform.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
@@ -1956,10 +1957,15 @@ static int __init arm_smmu_init(void)
 
 static int __init arm_smmu_of_setup(struct device_node *np)
 {
+	struct platform_device *pdev;
 
 	if (!init_done)
 		arm_smmu_init();
 
+	pdev = of_platform_device_create(np, NULL, NULL);
+	if (IS_ERR(pdev))
+		return PTR_ERR(pdev);
+
 	of_iommu_set_ops(np, &arm_smmu_ops);
 
 	return 0;
-- 
1.9.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/4] iommu/arm-smmu: misc fixes for SMMUv1/SMMUv2 Anup Patel <anup.patel@broadcom.com> - 2016-02-08 06:30 +0100
  [PATCH v2 2/4] iommu/arm-smmu: Invoke DT probe from arm_smmu_of_setup() Anup Patel <anup.patel@broadcom.com> - 2016-02-08 06:30 +0100
  [PATCH v2 1/4] iommu/arm-smmu: Init driver using IOMMU_OF_DECLARE Anup Patel <anup.patel@broadcom.com> - 2016-02-08 06:30 +0100
  [PATCH v2 4/4] iommu/arm-smmu: Add stub of_xlate() operation in SMMUv1/SMMUv2 driver Anup Patel <anup.patel@broadcom.com> - 2016-02-08 06:30 +0100
    Re: [PATCH v2 4/4] iommu/arm-smmu: Add stub of_xlate() operation in  SMMUv1/SMMUv2 driver Mark Rutland <mark.rutland@arm.com> - 2016-02-08 12:20 +0100
      Re: [PATCH v2 4/4] iommu/arm-smmu: Add stub of_xlate() operation in  SMMUv1/SMMUv2 driver Anup Patel <anup.patel@broadcom.com> - 2016-02-08 13:50 +0100
        Re: [PATCH v2 4/4] iommu/arm-smmu: Add stub of_xlate() operation in  SMMUv1/SMMUv2 driver Mark Rutland <mark.rutland@arm.com> - 2016-02-08 14:50 +0100
  [PATCH v2 3/4] of: iommu: Increment DT node refcount in of_iommu_set_ops() Anup Patel <anup.patel@broadcom.com> - 2016-02-08 06:30 +0100

csiph-web