From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anup Patel Subject: [RFC PATCH 2/6] iommu/arm-smmu: Invoke DT probe from arm_smmu_of_setup() Date: Wed, 27 Jan 2016 10:51:15 +0530 Message-ID: <1453872079-27140-3-git-send-email-anup.patel@broadcom.com> References: <1453872079-27140-1-git-send-email-anup.patel@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1453872079-27140-1-git-send-email-anup.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Catalin Marinas , Joerg Roedel , Will Deacon , Robin Murphy , Sricharan R , Linux IOMMU , Linux ARM Kernel Cc: Mark Rutland , Device Tree , Scott Branden , Pawel Moll , Ian Campbell , Ray Jui , Linux Kernel , Vikram Prakash , Rob Herring , BCM Kernel Feedback , Kumar Gala List-Id: devicetree@vger.kernel.org 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 --- 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 22b9668..9bdf6b2 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -1915,10 +1916,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