Received: by 10.223.176.46 with SMTP id f43csp568063wra; Wed, 24 Jan 2018 02:36:35 -0800 (PST) X-Google-Smtp-Source: AH8x2265SrVkcWirCxswiaOO/R76mdm1swIIGcwzLsXImMH4GFV2ovbPdTNH+7ciuTLyDbHtzj4u X-Received: by 2002:a17:902:5417:: with SMTP id d23-v6mr7641372pli.330.1516790195327; Wed, 24 Jan 2018 02:36:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516790195; cv=none; d=google.com; s=arc-20160816; b=xlb/hqheRPzRYF5nXsvCwhzm58QpNEu2evPmEfPxQaFHj4iWnExLUm85DMRXfG/oZL 3+dnfjnKRnJcTUXhTGX5amWCWU8jvbiz+Tk5jKuFQr70rKMdSaqRZV24k/9slIs3X/X1 eAeTEqBLMpYOqm3jEq3lKWlK3JjIdRKzIy3k4uifN+uERTDUD6qq+1Lrpcv7CY2vkMDn agFVq82CxDqjKt2fyu73azM2ZoczJs8WdfJx9cuemHY3TdAk4LHWCM1io1d5Jn/W3Go4 7zlSReyIcpRVEBhDAZAoXUw68ZdpGXGxFqaq7wzf3nh+kmgFSDzoKcwdaAo8UTzcGoeU ZrkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=xyq7HFSNW4NwYciBIUxlYpeyN0fc3YNUInjD2GiaQe8=; b=xZfc/EdVMNobuqGjMBj5loa1aTeDPOeW/ZdT2OEdUQMVxo0UjvHG3ehM4HnzVOj+2R FelrvqEBpTwNl5Fs3pt9odjAtKnR7qgMAAEcRQ601sNKfGBAxUtYfTGCpmGBboSZp8jg av91ejGG3LYvGYjEPwMqGBS5/bbNz6SfKcEtFxUvW2m7l+FuYhjQteKLB6kdqcmtqZcU Gp9ivO030Y98oiLeqeiAGElsuiPQGmTYVobTY0awbQtW9ajNWC5iLhFHtOPmBwJF3GqJ YEH7lhlBJGT+c3BdUmD9KMTQfxt8HcpvFAkVigj2ccFCTbSGgEHspx1IDa/MPBYYA1UK Sm6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si3813158pgt.575.2018.01.24.02.36.21; Wed, 24 Jan 2018 02:36:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933090AbeAXKfk (ORCPT + 99 others); Wed, 24 Jan 2018 05:35:40 -0500 Received: from regular1.263xmail.com ([211.150.99.136]:42435 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932884AbeAXKfi (ORCPT ); Wed, 24 Jan 2018 05:35:38 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.232]) by regular1.263xmail.com (Postfix) with ESMTP id B7E6665; Wed, 24 Jan 2018 18:35:31 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 0C9DA383; Wed, 24 Jan 2018 18:35:20 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: <26c799d3f2aa3fe417eb3a219dadf182> X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 552G06QNR; Wed, 24 Jan 2018 18:35:32 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.org Cc: jcliang@chromium.org, robin.murphy@arm.com, xxm@rock-chips.com, tfiga@chromium.org, Jeffy Chen , devicetree@vger.kernel.org, Heiko Stuebner , linux-rockchip@lists.infradead.org, iommu@lists.linux-foundation.org, Rob Herring , Mark Rutland , Joerg Roedel , Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 00/13] iommu/rockchip: Use OF_IOMMU Date: Wed, 24 Jan 2018 18:35:03 +0800 Message-Id: <20180124103516.2571-1-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series fixes some issues in rockchip iommu driver, and add of_iommu support in it. Changes in v5: Use out labels to save the duplication between the error and success paths. Use RK_MMU_POLL_PERIOD_US instead of 100. Remove clk names. Use clk_bulk APIs. Avoid race about pm_runtime_get_if_in_use() and pm_runtime_enabled(). Changes in v4: Rewrite commit message. Changes in v3: Also remove remove() and module_exit() as Tomasz suggested. Loop platform_get_irq() as Robin suggested. Add struct rk_iommudata. Squash iommu/rockchip: Use iommu_group_get_for_dev() for add_device Only call startup() and shutdown() when iommu attached. Remove pm_mutex. Check runtime PM disabled. Check pm_runtime in rk_iommu_irq(). Remove rk_iommudata->domain. Changes in v2: Move irq request to probe(in patch[0]) Move bus_set_iommu() to rk_iommu_probe(). Jeffy Chen (9): iommu/rockchip: Prohibit unbind and remove iommu/rockchip: Fix error handling in probe iommu/rockchip: Request irqs in rk_iommu_probe() ARM: dts: rockchip: add clocks in vop iommu nodes iommu/rockchip: Use IOMMU device for dma mapping operations iommu/rockchip: Use OF_IOMMU to attach devices automatically iommu/rockchip: Fix error handling in init iommu/rockchip: Add runtime PM support iommu/rockchip: Support sharing IOMMU between masters Tomasz Figa (4): iommu/rockchip: Fix error handling in attach iommu/rockchip: Use iopoll helpers to wait for hardware iommu/rockchip: Fix TLB flush of secondary IOMMUs iommu/rockchip: Control clocks needed to access the IOMMU .../devicetree/bindings/iommu/rockchip,iommu.txt | 8 + arch/arm/boot/dts/rk3036.dtsi | 1 + arch/arm/boot/dts/rk3288.dtsi | 2 + drivers/iommu/rockchip-iommu.c | 618 +++++++++++---------- 4 files changed, 343 insertions(+), 286 deletions(-) -- 2.11.0