From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752309AbcBHFZy (ORCPT ); Mon, 8 Feb 2016 00:25:54 -0500 Received: from 5520-maca-inet1-outside.broadcom.com ([216.31.211.11]:51607 "EHLO mail-irv-18.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750820AbcBHFZu (ORCPT ); Mon, 8 Feb 2016 00:25:50 -0500 From: Anup Patel To: Catalin Marinas , Joerg Roedel , Will Deacon , Robin Murphy , Sricharan R , Linux IOMMU , Linux ARM Kernel Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Device Tree , Ray Jui , Scott Branden , Vikram Prakash , Linux Kernel , BCM Kernel Feedback , Anup Patel Subject: [PATCH v2 2/4] iommu/arm-smmu: Invoke DT probe from arm_smmu_of_setup() Date: Mon, 8 Feb 2016 10:47:30 +0530 Message-Id: <1454908652-15317-3-git-send-email-anup.patel@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454908652-15317-1-git-send-email-anup.patel@broadcom.com> References: <1454908652-15317-1-git-send-email-anup.patel@broadcom.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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 2c8f871..02cd67d 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -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