Received: by 10.223.176.46 with SMTP id f43csp1900758wra; Thu, 25 Jan 2018 01:43:23 -0800 (PST) X-Google-Smtp-Source: AH8x226KaH5A7tmPpkreTIple/Rsjk9hLFXjhReSCjqkcOMAMjWWqSd4m8MWQgOw/+6BD07hOh3q X-Received: by 10.98.23.23 with SMTP id 23mr15774472pfx.179.1516873403728; Thu, 25 Jan 2018 01:43:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516873403; cv=none; d=google.com; s=arc-20160816; b=gdQelWe+oHT880rJOSEtlQefaBkDr0v1A3xfgNXd07eD7atMMktUdUx3FIFIfd++Pp AKteB8mwMWhV7K00BO0hvXhdQlSYcpzRBZ7yLQc2ci4PGVtGlrWm0DvfsYKGr2bZ9RVB sFIoGlcZaAeHJfwXOu5dCq/lWjyq7nkmVQ9tZwtqfa+s3GI9JEf8RYZe76GrDH2el3rq c8bD6A03ga8tuUS+/2nXlvRjc8tvafkK4nMKymmSmY/dI32TaesJFp4Oksmkkq0V8eDZ 6DqYHjEU4D0PUdjAW+sc6lAKPl2L75CI2n6xbhTvIoh0y6F38/IXKTVpe6PjzVQavwt2 e0Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=27S4GagxOj6Rz96OTXO/bZ6KcQ3qLPWOtOgsPOX+kZc=; b=vfy1jYO2pVmK05vfkxkZ4nYyX9LSS2WJLtNxufARrkZ3c/xsa/70hDhLeCVyaN2yiC 66lu7mzMzKWsY9ZNj0hmKCzHohhDdXMxvfD8qoT0NHI+DLSgtbbMNX8GJ4pLw/VOn4qp IsY47X3RkJ92Ntia3DhQKnygQ9Q3lR9VEHFdXRAPrkCSdeVD4zzKanSXF+fcv7mybU+0 AStFiXh95BigvWX9DN5vZyrSoOKMFn1/jyhZpOOuXqrlFfq1gcWaCfs+yGr4hfpJyain r74h3dlJIAOtsEqUP5eiAixqW8q5Ld45cgdtauhBAkrqIe0z6StlGriM03F3YWvnIFok SosQ== 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 e12-v6si751808plj.600.2018.01.25.01.43.09; Thu, 25 Jan 2018 01:43:23 -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 S1751235AbeAYJmo (ORCPT + 99 others); Thu, 25 Jan 2018 04:42:44 -0500 Received: from regular1.263xmail.com ([211.150.99.136]:59890 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751086AbeAYJml (ORCPT ); Thu, 25 Jan 2018 04:42:41 -0500 Received: from randy.li?rock-chips.com (unknown [192.168.167.224]) by regular1.263xmail.com (Postfix) with ESMTP id B9F4039; Thu, 25 Jan 2018 17:42:28 +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 [192.168.10.130] (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 18FCD3C2; Thu, 25 Jan 2018 17:42:19 +0800 (CST) X-RL-SENDER: randy.li@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: randy.li@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: randy.li@rock-chips.com X-DNS-TYPE: 0 Received: from [192.168.10.130] (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 2314I8L4A5; Thu, 25 Jan 2018 17:42:25 +0800 (CST) Subject: Re: [PATCH v4 08/13] iommu/rockchip: Control clocks needed to access the IOMMU To: JeffyChen , tfiga@chromium.org Cc: Robin Murphy , linux-kernel@vger.kernel.org, Mark Rutland , devicetree@vger.kernel.org, xxm@rock-chips.com, Joerg Roedel , jcliang@chromium.org, linux-rockchip@lists.infradead.org, iommu@lists.linux-foundation.org, Rob Herring , linux-arm-kernel@lists.infradead.org, Heiko Stuebner References: <20180118115251.5542-1-jeffy.chen@rock-chips.com> <20180118115251.5542-9-jeffy.chen@rock-chips.com> <5A60AE41.2050101@rock-chips.com> <1f4b3c0d-1414-0012-a072-f4a11f432c21@rock-chips.com> <5A654925.9020203@rock-chips.com> <5A6563FA.8080602@rock-chips.com> From: Randy Li Organization: Fuzhou Rockchip Message-ID: Date: Thu, 25 Jan 2018 17:42:17 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5A6563FA.8080602@rock-chips.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/22/2018 12:09 PM, JeffyChen wrote: > Hi Randy, > > On 01/22/2018 10:15 AM, JeffyChen wrote: >> Hi Randy, >> >> On 01/22/2018 09:18 AM, Randy Li wrote: >>>> >>> Also the power domain driver could manage the clocks as well, I would >>> suggest to use pm_runtime_*. >> >> actually the clocks required by pm domain may not be the same as what we >> want to control here, there might be some clocks only be needed when >> accessing mmu registers. >> >> but i'm not very sure about that, will confirm it with Simon Xue. > > confirmed with Simon, there might be some iommus don't have a pd, and We use the pd to control the NIU node(not on upstream), without a pd or fake pd, none of the platform would work. > the CONFIG_PM could be disabled.I am hard to believe a modern platform can work without that. > > so it might be better to control clocks in iommu driver itself.I won't insist how the version of the iommu patch on the upstream, I just post an idea here. The version for kernel 4.4 is under internal review, the implementation has been modified many times. I would suggest the managing clocks in pd is a more easy way and don't need to spare those thing in two places. > > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip > -- Randy Li