Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3107575imm; Tue, 29 May 2018 00:49:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpAuZnCjS5bmf0fuBLDk4lo0A4RE2vCZK0O1/EMDtIhOZTpZ9lIQYnIKU3mvqrBp2Xnna4x X-Received: by 2002:a62:2417:: with SMTP id r23-v6mr16337764pfj.108.1527580162325; Tue, 29 May 2018 00:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527580162; cv=none; d=google.com; s=arc-20160816; b=ydXhXyosR6hD4ltnAvdgIDUE2HoqF0sb19+HfY4qmGyEIboafZVj3WE6km3bitsSM6 e0GfF9u4thMr0Rdf2RIscykC0bmy25JjAOoPcnD4e68zf2GF2JDbvuDCObi/4dDmp3U0 S4gTEf+8Z/v/jl1hygYzq8krqPjnTO4GqDo/iwfQEbOMhS3NkR9HMuT+u8lMzbF22Ck3 0+2usXX2kS61u/CDlhiMhJfck7eWsS1lEEyVKfmPD3xmmgfe6pv5GxS8oKbUvL2YP3fP A9aaRcjXe1aBsBKNMhXZTvYn88mlqnmW0wxt3FZ6sPg49YFHs2lUVwn8YCbM8ZhQgLD5 HwTg== 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=GxlUedjW9I2Cf8H28wwzPfGpTEEK/kMoXDYVo+fs9kk=; b=gWNgE4v2fqYrtyrgTGPJweuj/2SCPGWHWAG7CCLG/+l6Jhe2FkMifdayJ9Mkmt+9zJ RBFyL4Mxz8wMHtb500u3LDdLAe2ZZmn/kHywanDTH5hAGsaDdNxe7uVNuF4bnTTGcFff IU5P0+PjqHOjA8KLjyapko+SZD0wRoIauy060FsGUBVYi5mQm6TvcQZzl02ObZ4Zy1Ed 7SmDZTg6xJ9TsB+anZvY3Ukynbkgiz1IazTdi0CL58Lxevl5xZWIGrfNP0QFk1E/tLft XstvNtbbf34KPaqEc+GkK6O81f7zBzD6KiD1QjRZS9pkM53ZE3y3yt/8f7BfEz0PYAmZ 1LtA== 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 d7-v6si32879599pfe.214.2018.05.29.00.49.08; Tue, 29 May 2018 00:49: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 S932118AbeE2HsC (ORCPT + 99 others); Tue, 29 May 2018 03:48:02 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:7952 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754922AbeE2Hrs (ORCPT ); Tue, 29 May 2018 03:47:48 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1, AES128-SHA) id ; Tue, 29 May 2018 00:47:58 -0700 Received: from HQMAIL101.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Tue, 29 May 2018 00:47:51 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Tue, 29 May 2018 00:47:51 -0700 Received: from tbergstrom-lnx.Nvidia.com (172.20.13.39) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 29 May 2018 07:47:46 +0000 Received: by tbergstrom-lnx.Nvidia.com (Postfix, from userid 1002) id 64FD7F80B4B; Tue, 29 May 2018 10:48:04 +0300 (EEST) Date: Tue, 29 May 2018 10:48:04 +0300 From: Peter De Schrijver To: Stefan Agner CC: , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v2 4/6] clk: tegra20: init NDFLASH clock to sensible rate Message-ID: <20180529074804.GA6708@tbergstrom-lnx.Nvidia.com> References: <20180527215442.14760-5-stefan@agner.ch> <20180528075510.GQ6835@tbergstrom-lnx.Nvidia.com> <5665b799f763daa82dced238fb494863@agner.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <5665b799f763daa82dced238fb494863@agner.ch> X-NVConfidentiality: public User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL106.nvidia.com (172.18.146.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 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. Cheers, Peter.