Received: by 10.223.185.116 with SMTP id b49csp7255599wrg; Thu, 1 Mar 2018 02:29:42 -0800 (PST) X-Google-Smtp-Source: AG47ELuX/LtRokou/1jIVYCaGNukNXDLivYkYi7fbAXMkStjI0SecAV3cUSd4RAlBRrNQsctXrbZ X-Received: by 10.98.66.89 with SMTP id p86mr1430067pfa.228.1519900181932; Thu, 01 Mar 2018 02:29:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519900181; cv=none; d=google.com; s=arc-20160816; b=Ndor1ZNWTMUsrLlqTdJw/p8xfhXDVuCsVH5t3r2pRzYmnLEJCczJ6t7wmHNteIJuTG 20+BXxvivGUU1jw0Ng/dN863PGGefymZvlWDj8enIGQzNPO4Xu4wgmtDT+wnFeRVyQpL Xu8RuL8oi1frzcXA+l5DqnYqfdwB4bHRAVHADqUAW6s3Hw6tdvLEWwhD5fBwzeVW7KhL kTcYHaAOV1NsfkQP2Bisc6svC2SZrTJZwqrsiPLfT2EIqFKNRyyeI07dCzadiypINJFw WzRsX7ymQ+FDodZWPtS/CnBLERnY5gcyrl+BE9hwm/EY8RM7YY3cgstp6ewH6C+JXZtw O8Nw== 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=NYep1CC7x3syRlZ1TPSl0gmHHm3Cj/yppC6U8KBzQjtM0ZbksyiTwpxfOaYQgJF9oG yBw9tF1A/gh5jnhPpiViUHtrbXJKPMYrEulbPWj9DczJUv86XDyL+roWjdfr2lSYemA9 3IPehtluGSzYdEbeQ8J2ldS/GwT5E8QBRu6/OW+YbmvZ5P2rZlWn/hbFxHKxKENEIkcn MNyCtrQnLtiEt1Rrxa4ChEAYo6lgZbkk0w2Nifrs0A0L/LzSlDZeZYRNMyOJRy4K77J0 kca0+Jvji85Z2s5rV5xuAK5ieKRq4RHdHVSgHOY+81CNa/TNn9OCj+I74WKK9FgOuGwl Ppjg== 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 d4si2283109pgq.337.2018.03.01.02.29.27; Thu, 01 Mar 2018 02:29:41 -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 S935849AbeCAKTJ (ORCPT + 99 others); Thu, 1 Mar 2018 05:19:09 -0500 Received: from regular1.263xmail.com ([211.150.99.139]:35837 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935717AbeCAKTE (ORCPT ); Thu, 1 Mar 2018 05:19:04 -0500 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.225]) by regular1.263xmail.com (Postfix) with ESMTP id 9924855D2; Thu, 1 Mar 2018 18:18:59 +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 B8C88387; Thu, 1 Mar 2018 18:18:42 +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: <89ca9d8111b6b119d6b51bf723c5f588> 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 569U430TV; Thu, 01 Mar 2018 18:19:00 +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, Rocky Hao , 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, Caesar Wang , Mark Rutland Subject: [RESEND PATCH v6 00/14] iommu/rockchip: Use OF_IOMMU Date: Thu, 1 Mar 2018 18:18:23 +0800 Message-Id: <20180301101837.27969-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