From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751247AbeAYJmo (ORCPT ); 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 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 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-DNS-TYPE: 0 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randy Li Subject: Re: [PATCH v4 08/13] iommu/rockchip: Control clocks needed to access the IOMMU Date: Thu, 25 Jan 2018 17:42:17 +0800 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5A6563FA.8080602-TNX95d0MmH7DzftRWevZcw@public.gmane.org> Content-Language: en-US Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: JeffyChen , tfiga-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org Cc: Robin Murphy , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Rutland , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, xxm-TNX95d0MmH7DzftRWevZcw@public.gmane.org, Joerg Roedel , jcliang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Rob Herring , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Heiko Stuebner List-Id: devicetree@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-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip > -- Randy Li -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: randy.li@rock-chips.com (Randy Li) Date: Thu, 25 Jan 2018 17:42:17 +0800 Subject: [PATCH v4 08/13] iommu/rockchip: Control clocks needed to access the IOMMU In-Reply-To: <5A6563FA.8080602@rock-chips.com> 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> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.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 at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip > -- Randy Li