Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4200098imm; Wed, 30 May 2018 00:43:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLWT9bL+mnTI7bVQgiabSdL7qwIowDbCfVTgMMGSnpGwCKMPKIfo4a3o4+ol02oG8yvPbbg X-Received: by 2002:a17:902:43:: with SMTP id 61-v6mr1828585pla.112.1527666203029; Wed, 30 May 2018 00:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527666203; cv=none; d=google.com; s=arc-20160816; b=1Kb9sQx9eE6DCCzkVVcQkj5AK3PzgrEeTDDnW52uqG8N4qnK7avTjWcX5tK3it3Xu0 LmU3qvWIGkQSDp1+tiAmKq1N44GzcibxR/vEIGVRwiA/q21HjrPNEWOdFNnoEaVkpvm4 ZxA2orUdOO+rZZ/5C/HYjjq/DAKnUtdvSyZqHzKBvpa1J6DRvmTIBe/OIhMQ+neXDoXn dHDWx97MW0l68fNHFylPq4x/ekheSe6toIV5Jo5Za7vUenPHFBuHoIhQ8FyfLVxQANKM lvo0ZdCukIDaAWjY+/GqqRKRdERCnj1F+7vPnu0wm1k/tou68rfie+Os0ywcgDWTJvSY zjAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=fHOFgpaDmw3uhQ6DbNVjPiinF0xAxjk7gQcHj1XTkF0=; b=ngYPIRxiX1vqLTQpD7IhvFsSpcBdjI5/hZ2+JSU+b/ujiNQSWxQpkre8/nhJWr/+at zUGUHCPW7MJZiwf5yVFFMkde7fxqqCW1ShyHXGrNvQmKpnk3BdKeW4EXB70uibodxRNK S9A2lYilKnlMUsi5Lv57UWi6Z6rzK0aeEd0cDrCXMy3A7UVxf/ns2JutvG4H6UWHMTcj ZEqP/7LJdpxwcU0l8M1IAh2/6HczchiC2G7Nm57pd7K9oN8k3gA7WBnYq8ciJwhrZA6v v1G6s8bXRA/nlGEpFQttWSJLk2qBb7ODUUSJbwGpIlewARlf7BsqykrIorKj5Rvni8bs Cf8w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w24-v6si32562608plq.254.2018.05.30.00.43.09; Wed, 30 May 2018 00:43:22 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030358AbeE3Hma (ORCPT + 99 others); Wed, 30 May 2018 03:42:30 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:14008 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935134AbeE3HmZ (ORCPT ); Wed, 30 May 2018 03:42:25 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1, AES128-SHA) id ; Wed, 30 May 2018 00:42:23 -0700 Received: from HQMAIL101.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 30 May 2018 00:42:24 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 30 May 2018 00:42:24 -0700 Received: from tbergstrom-lnx.Nvidia.com (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 30 May 2018 07:42:08 +0000 Received: by tbergstrom-lnx.Nvidia.com (Postfix, from userid 1002) id 98DDAF806BE; Wed, 30 May 2018 10:42:25 +0300 (EEST) Date: Wed, 30 May 2018 10:42:25 +0300 From: Peter De Schrijver To: Dmitry Osipenko CC: Stefan Agner , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v2 4/6] clk: tegra20: init NDFLASH clock to sensible rate Message-ID: <20180530074225.GC6708@tbergstrom-lnx.Nvidia.com> References: <20180527215442.14760-5-stefan@agner.ch> <20180528075510.GQ6835@tbergstrom-lnx.Nvidia.com> <5665b799f763daa82dced238fb494863@agner.ch> <20180529074804.GA6708@tbergstrom-lnx.Nvidia.com> <90180dd9fc6e60175c54b9d70e50f0e5@agner.ch> <04cdfdf5-33c5-b569-9cd7-dda1b9ea0baf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <04cdfdf5-33c5-b569-9cd7-dda1b9ea0baf@gmail.com> X-NVConfidentiality: public User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL101.nvidia.com (172.20.187.10) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 29, 2018 at 03:19:47PM +0300, Dmitry Osipenko wrote: > On 29.05.2018 15:12, Stefan Agner wrote: > > On 29.05.2018 09:48, Peter De Schrijver wrote: > >> On Mon, May 28, 2018 at 05:53:08PM +0200, Stefan Agner wrote: > >>> On 28.05.2018 09:55, Peter De Schrijver wrote: > >>>> On Sun, May 27, 2018 at 11:54:40PM +0200, Stefan Agner wrote: > >>>>> From: Lucas Stach > >>>>> > >>>>> Set up the NAND Flash controller clock to run at 150MHz > >>>>> instead of the rate set by the bootloader. This is a > >>>>> conservative rate which also yields good performance. > >>>>> > >>>>> Signed-off-by: Lucas Stach > >>>>> Signed-off-by: Stefan Agner > >>>>> --- > >>>>> drivers/clk/tegra/clk-tegra20.c | 1 + > >>>>> 1 file changed, 1 insertion(+) > >>>>> > >>>>> diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c > >>>>> index 0ee56dd04cec..dff8c425cd28 100644 > >>>>> --- a/drivers/clk/tegra/clk-tegra20.c > >>>>> +++ b/drivers/clk/tegra/clk-tegra20.c > >>>>> @@ -1049,6 +1049,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { > >>>>> { TEGRA20_CLK_GR2D, TEGRA20_CLK_PLL_C, 300000000, 0 }, > >>>>> { TEGRA20_CLK_GR3D, TEGRA20_CLK_PLL_C, 300000000, 0 }, > >>>>> { TEGRA20_CLK_VDE, TEGRA20_CLK_CLK_MAX, 300000000, 0 }, > >>>>> + { TEGRA20_CLK_NDFLASH, TEGRA20_CLK_PLL_P, 150000000, 0 }, > >>>>> /* must be the last entry */ > >>>>> { TEGRA20_CLK_CLK_MAX, TEGRA20_CLK_CLK_MAX, 0, 0 }, > >>>>> }; > >>>>> -- > >>>>> 2.17.0 > >>>>> > >>>> > >>>> Maybe better to specify this in the Tegra20 dtsi? See > >>>> "Assigned clock parents and rates" in > >>>> Documentation/devicetree/bindings/clock/clock-bindings.txt > >>> > >>> assigned-clocks indeed works just fine for this case. Thanks for > >>> bringing this up, will drop this patch and add the device tree > >>> properties in v3. > >>> > >>> Hm, interesting that none of the Tegra device tree make use of the > >>> feature so far. I guess there would be other cases where this would be > >>> useful as well (the one just above, VDE?). > >>> > >> > >> Yes, historically this feature wasn't available, so we used these init tables. > >> Unfortunately it's not easy to get rid of them for parent and rate > >> configuration, because new kernels should also work with existing DTBs, so we > >> can't just add assigned-clock properties and remove the existing table > >> entries. What we could do is use the CLK_IS_CRITICAL flag for all clocks which > >> are only enabled by the init table. For not yet merged blocks, this is > >> ofcourse not a concern. > > > > Sure I understand. > > > > Was just somewhat surprised that it isn't used at all yet (grep -r -e > > assigned-clock arch/arm/boot/dts/tegra* returns nothing). After all, > > assigned clocks bindings have been merged in 2014 :-) > > > > At least "clk: tegra: Specify VDE clock rate" merged earlier this year > > would have been a candidate already. > > I wasn't even aware of existence of the assigned-clock properties, probably just > like others. This feature seems to be little used indeed. Not sure why. Peter.