Received: by 10.223.185.116 with SMTP id b49csp7240863wrg; Thu, 1 Mar 2018 02:11:00 -0800 (PST) X-Google-Smtp-Source: AG47ELsyw1gGlRvzNnI5O4UefJPOSJWRZQt82NxWygvJoOu9i2Vu+KaDRxXjiRGduh+zvKvKNBSz X-Received: by 10.98.31.155 with SMTP id l27mr1405351pfj.176.1519899060718; Thu, 01 Mar 2018 02:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519899060; cv=none; d=google.com; s=arc-20160816; b=jhhQzb8sveBQWvVEydyImAel+4mg8V8pPb3TpG7enAeTe0eFm2P2xnXrHaOkLkHYtv FPJQUBlUCpZKBJxyyrWvplPXo/W3JAqRJ09ybGDrDEiEQsH/bzasyk0WSYu54Kyon6JP ZZoEMqSauKGx9sBEppXwAqajB2sjIet3FX84dlmlh5i/rRPQinxxtJHJI5vKknvmN1V1 i5bqVXaxxKw7j4w66yUaLVYBIplp+GPo55dStJOaAJSs4XyIZrYCCqxYyXulFSFvd+Gn faq+SP71si/XlZSefOKyscpGeYHG/OjkrewUp4jQP50DoXVVKDwvpibLnbEveamJrYFA mdow== 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=Tl/Sb5omVaDnUIQC6Rr8JkfNUAcSS6EXTxNcS81a1Co=; b=AKSeg0HFl3lqg9Qep5lJous9dHuKW9lrJwnVGyWkJfe2p3O4EPY6ePZM8AfDAAAaaS oyyBLy6o7/Qp9W4z9gR3DrFRmHgJxnq29ztnaPeZeJLrWzqgw4qgkCk4bYj68kJ8Mwd3 Ob0z9keFIXZIUp06/+UiOXLHqh04vTyhnoo1RNoP+AUTl68nYV5kaYsM9txG5oAKPA4x 0TlZrH770pT4FPGz2iIK2AF/7Y5S5Dd1b3bTluCzqrRP1nxx0F6kWwEiBb+BrsjW6CKN nB3oV9vTzbTiDTilXlB58TJ9AMFD+ZTJlT9pXOWnoTjrbS+Af0YaOMZ+899wr/4/qvMD wzmA== 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 b73-v6si2872715pli.261.2018.03.01.02.10.46; Thu, 01 Mar 2018 02:11:00 -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 S967419AbeCAKJA (ORCPT + 99 others); Thu, 1 Mar 2018 05:09:00 -0500 Received: from regular1.263xmail.com ([211.150.99.138]:39249 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967178AbeCAKIu (ORCPT ); Thu, 1 Mar 2018 05:08:50 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.160]) by regular1.263xmail.com (Postfix) with ESMTP id 3FA5479BF; Thu, 1 Mar 2018 18:08:41 +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 926823B2; Thu, 1 Mar 2018 18:08:30 +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: <4bb06e1c54a2784e336f8fc0747ea582> 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 15937K7TQAU; Thu, 01 Mar 2018 18:08:40 +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 , Romain Perier , Arnd Bergmann , Liang Chen , Rob Herring , Shawn Lin , Catalin Marinas , Joerg Roedel , Huibin Hong , David Wu , Finley Xiao , Enric Balletbo i Serra , Heiko Stuebner , Jacob Chen , Kever Yang , Brian Norris , linux-rockchip@lists.infradead.org, Will Deacon , Nickey Yang , devicetree@vger.kernel.org, Mark Yao , Russell King , linux-arm-kernel@lists.infradead.org, Jianqun Xu , Sugar Zhang , iommu@lists.linux-foundation.org, Mark Rutland Subject: [PATCH v6 00/14] iommu/rockchip: Use OF_IOMMU Date: Thu, 1 Mar 2018 18:08:10 +0800 Message-Id: <20180301100824.14887-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 v6: Add clk names, and modify all iommu nodes in all existing rockchip dts Fix dt-binding as Robin suggested. Use aclk and iface clk as Rob and Robin suggested, and split binding patch. 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 (10): 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 iommu nodes dt-bindings: iommu/rockchip: Add clock property 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 | 7 + arch/arm/boot/dts/rk3036.dtsi | 2 + arch/arm/boot/dts/rk322x.dtsi | 8 + arch/arm/boot/dts/rk3288.dtsi | 12 + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 10 + arch/arm64/boot/dts/rockchip/rk3368.dtsi | 10 + arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +- drivers/iommu/rockchip-iommu.c | 600 +++++++++++---------- 8 files changed, 374 insertions(+), 289 deletions(-) -- 2.11.0