Received: by 10.223.176.5 with SMTP id f5csp1017921wra; Fri, 2 Feb 2018 09:47:20 -0800 (PST) X-Google-Smtp-Source: AH8x226sGBnKCpFS6RhfCe97ZvOsAOmIIhc5rvHYwJriatRk6lTIj/BDIQl+xoZd7Er76lM+y5CO X-Received: by 10.99.160.26 with SMTP id r26mr31514434pge.230.1517593639960; Fri, 02 Feb 2018 09:47:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517593639; cv=none; d=google.com; s=arc-20160816; b=zUPfv2wm+4K+uhc9uPeO6fR/8Q2+Xjgx6lzYCohPBGFf4qrnEkWm1XjpxwXFOPRfjf CwjVWXhH3JHg/xO3zsUoYkZHQ34N5yHtkjSt/iAUZLKDpl2l0ardslSlbxKInkDMhx8a CkS6ss98XgLWD2wc219YK14VAsYsjxsKx4DDNM7z+CeOfYut4sOHk1vucL/p2VXCUI3E lUJ+vaIofbVecMkXbkizyHALdzvkPGz0z2wDsRwO/HllfvwgMdKuhJpmTFs8x3aQQ9/R hcTGO5auHXqqjJfK57hRMygUDn9zB/vPiMdCUE8uv/6DrZPtJE4yFb16c+15emBIWzzY dSvA== 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:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=9aRnGzjgnDD7AqzNADrK9E7E/Z4zQFT+5MGOnEsgpUU=; b=PeBPpSW074p7H5xCKo3AtBDyNZ5uBXv+jYUD8xDSw+eIMDhEfdDhtep4QPtB8OWX1C z9jAYEeeKnjACXIBEw0yh1eHbVC5K+di2Su7jNsH9Hpw0s1XsDNlv9TLhsCBPZA8KP9C 4lDFj7Hz2g3wIkFSgS7FNqTGteauhfw+TNHPl45cw9WufmXpmkoZoFLYmpJP0GGz0yNc KD2R/WASDePEijeSH2xXJRAzepViY+dJKGw23i+MWbde5B05RBSxsh9v+5QwEAI/cVvw BhKjjKsLQs7pfX+yQwCE1uRqAfPr8mKMjwXKtkUHnN3RE1KwwXvYyBtDUx49GYmgSfjy oGvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=EVYMXxxI; 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 s2si2180636pfj.279.2018.02.02.09.47.05; Fri, 02 Feb 2018 09:47:19 -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; dkim=fail header.i=@lechnology.com header.s=default header.b=EVYMXxxI; 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 S1753435AbeBBRp7 (ORCPT + 99 others); Fri, 2 Feb 2018 12:45:59 -0500 Received: from vern.gendns.com ([206.190.152.46]:47920 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753532AbeBBRpo (ORCPT ); Fri, 2 Feb 2018 12:45:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9aRnGzjgnDD7AqzNADrK9E7E/Z4zQFT+5MGOnEsgpUU=; b=EVYMXxxI27BZ8r9MbBse6GayvK E/7AQHiEw4HbAzLa0qCqEV+bdFhXKrmB6MkjjLWHiG2GOiFULFC6MwoEPDHr/LI2Er4yX5XNoP2+N o3YRoLujd2Hm4hDErWbHV+sNnhcozJov1epUphDTvkW6WFi2IhZgGaJ9DaOnIQ1ZCdSzBW7F1JPcB yCiEmOgnDmYntOLgKBgeMh8i7yvghMN/JoLvI4tm3WShnDmn4C5cdgN69rFAkKJDcaUExbfshp1WN 52VZ4cq+3JkkKZfwljrLFUtXUf0CvaWIa24mDr+E9FSLetSf882KWdfd0FXCzzHmmm3eOIhZHG+6o UnMw0GuQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:56524 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1ehfON-001jyL-IB; Fri, 02 Feb 2018 12:44:51 -0500 Subject: Re: [PATCH v6 04/41] clk: davinci: Add platform information for TI DA850 PLL To: Sekhar Nori , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Bartosz Golaszewski , Adam Ford , linux-kernel@vger.kernel.org References: <1516468460-4908-1-git-send-email-david@lechnology.com> <1516468460-4908-5-git-send-email-david@lechnology.com> <7d7e0522-30d5-6232-853e-7ab32fadfe48@lechnology.com> From: David Lechner Message-ID: <4a1d3a2f-128a-b6ff-3675-2ff0bf290dcd@lechnology.com> Date: Fri, 2 Feb 2018 11:45:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/02/2018 02:37 AM, Sekhar Nori wrote: > On Friday 02 February 2018 12:52 AM, David Lechner wrote: > >>> +static const char * const da850_pll1_obsclk_parent_names[] >>> __initconst = { >>> +    "oscin", >> >> Re: the issue of "ref_clk" vs. "oscin"... >> >> This is one of the places where having the otherwise unnecessary "oscin" >> clock >> really helps out. The PLL driver doesn't control "ref_clk" - it comes >> from somewhere >> else. And in the case of DT, it may not even be named "ref_clk", so we >> really >> don't want to hard-code the name "ref_clk" here. > > TBH, I don't really see what is wrong with mandating the name "ref_clk" > as the reference clock name to be provided. And for all board-files and > DTs to supply the same name. > >> If we have to allow a variable name here, it just makes more work in the >> driver >> shuffling names around. >> >> And the name "oscin" totally makes sense here because the TRM lists this >> input to the >> mux as "OSCIN". > > Fine with me if you feel it simplifies implementation for you (and also > because of the distinction you want to make between the external "before > CLKMODE" clock and internal "after CLKMODE" clock). What I do care about > though is: > > a) In the DT case, ability for different boards to provide different > ref_clk frequencies. We never really had this in the legacy board > file way (except some rudimentary support on DM6467T). And its fine > to continue with status quo for board files. You can do this now. You would just add something like this to the board's .dts file: & ref_clk { clock-frequency = <30000000>; /* 30 MHz */ }; > > b) In the DT case, ability for board to specify whether it uses the > on-chip oscillator or has an external clean clock provider. Boards with an oscillator don't need to do anything since that is the default. Boards with clock will need to do this: &pll0 { ti,clkmode-square-wave; }; > >>> +void __init da850_pll_clk_init(void __iomem *pll0, void __iomem *pll1) >>> +{ >>> +    const struct davinci_pll_sysclk_info *info; >>> + >>> +    davinci_pll_clk_register(&da850_pll0_info, "ref_clk", pll0); >> >> And really, we probably shouldn't be hard-coding "ref_clk" here either. >> Basically, we are making the assumption that the board file has registered >> a clock named "ref_clk". It would probably be better to pass the name >> as a parameter. > > As I noted before, I am not sure if this level of naming flexibility is > needed. Every board needs to have one anyway. They might as well call it > by the same name. > > That said, I wont oppose it either if you decide to have that flexibility. > I'll sleep on it. Like you, I could go either way. I'm temped to just leave it as-is though (with some added comments for clarification, of course).