From patchwork Mon May 23 11:01:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 9131549 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8135860459 for ; Mon, 23 May 2016 11:02:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 756BA2822E for ; Mon, 23 May 2016 11:02:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A2FC28233; Mon, 23 May 2016 11:02:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 591972822E for ; Mon, 23 May 2016 11:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754590AbcEWLC1 (ORCPT ); Mon, 23 May 2016 07:02:27 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:39752 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754587AbcEWLCZ (ORCPT ); Mon, 23 May 2016 07:02:25 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O7M00HIPMNSOM60@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Mon, 23 May 2016 12:02:16 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-47-5742e338a0cf Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 3F.A4.05254.833E2475; Mon, 23 May 2016 12:02:16 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O7M00I8EMNPTS70@eusync2.samsung.com>; Mon, 23 May 2016 12:02:16 +0100 (BST) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , Joerg Roedel , Inki Dae , Kukjin Kim , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [PATCH 4/3] iommu/exynos: Prepare for deferred probe support Date: Mon, 23 May 2016 13:01:27 +0200 Message-id: <1464001287-12748-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1463995809-26862-1-git-send-email-m.szyprowski@samsung.com> References: <1463995809-26862-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrALMWRmVeSWpSXmKPExsVy+t/xK7oWj53CDZY9lLbYOGM9q8Wk+xNY LBbst7bonL2B3eL1C0OL/sevmS02Pb7GajHj/D4mi7VH7rI7cHo8OTiPyWPTqk42j81L6j0m 31jO6NG3ZRWjx+dNcgFsUVw2Kak5mWWpRfp2CVwZx6YuYixYw12xsWcJawPjDs4uRk4OCQET iVkfW5kgbDGJC/fWs4HYQgJLGSU2/tfsYuQCspuYJC53TGEFSbAJGEp0ve0CKxIRyJd4sfcv C0gRs8AvRolzne1gk4QFXCX+dO8Ga2ARUJXo/vQILM4r4CHxeN45VohtchL/X64Ai3MKeEo8 XHYXarOHxPwLU5gmMPIuYGRYxSiaWppcUJyUnmuoV5yYW1yal66XnJ+7iRESbl92MC4+ZnWI UYCDUYmHdwOjU7gQa2JZcWXuIUYJDmYlEV7jR0Ah3pTEyqrUovz4otKc1OJDjNIcLErivHN3 vQ8REkhPLEnNTk0tSC2CyTJxcEo1MDL9ipQ37bx63Se4/MkGjr1s2/Ys2Fdid4R15fmVP/28 WxQVts4VY347f3HNHLVtOr8bfhY37tzU2O4ieXnNvLyTJgzJjXUNK0+dnPN/e97HrksK90+x cC1YX1AePNP/QW/mvLi4Mwxtmk/azQtC2ByfbTJKCS0KvvbF7kBf+7SqSLVdNvm+zUosxRmJ hlrMRcWJALUZ0qUzAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Register iommu_ops at the end of successful probe instead of doing that unconditionally. This makes Exynos IOMMU driver ready for deferred probe caused by not-yet-available clocks. Signed-off-by: Marek Szyprowski --- I'm sorry for the confussing patch number. This patch got lost while rebasing, but it should belong to the "Exynos IOMMU: improve clock management" patchset. Best regards Marek Szyprowski Samsung R&D Institute Poland --- drivers/iommu/exynos-iommu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index e0b834375f17..633e6d023c0d 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -581,6 +581,8 @@ static void sysmmu_tlb_invalidate_entry(struct sysmmu_drvdata *data, spin_unlock_irqrestore(&data->lock, flags); } +static struct iommu_ops exynos_iommu_ops; + static int __init exynos_sysmmu_probe(struct platform_device *pdev) { int irq, ret; @@ -654,6 +656,8 @@ static int __init exynos_sysmmu_probe(struct platform_device *pdev) pm_runtime_enable(dev); + of_iommu_set_ops(dev->of_node, &exynos_iommu_ops); + return 0; } @@ -1347,7 +1351,6 @@ static int __init exynos_iommu_of_setup(struct device_node *np) if (!dma_dev) dma_dev = &pdev->dev; - of_iommu_set_ops(np, &exynos_iommu_ops); return 0; }