Received: by 10.223.176.5 with SMTP id f5csp1098576wra; Fri, 2 Feb 2018 11:08:20 -0800 (PST) X-Google-Smtp-Source: AH8x224aUEBOzH2MvjQCrdzuSuYqsIZnVNw4uJweKauaTEFw9tROzrYGa6M1wf100luRRsw7XdJe X-Received: by 2002:a17:902:7042:: with SMTP id h2-v6mr5031462plt.217.1517598499946; Fri, 02 Feb 2018 11:08:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517598499; cv=none; d=google.com; s=arc-20160816; b=MfSXaocEe5sR+Etq1UgM+25QgfkQHirXOogT3ZfRz7n8NqGzeiswNrSTO0mTjXF8is MXSyA8311nMSHMq83EthoxSg+aWN6zOx6BRXl5oAl+L5cTKz3YE+SNaIkxUlibqMVZ2O ehKJkBHJUaMvJOM2ZTToZRCuHKG5St8VUlb0KO1we3kOY2JVHzSxoWEKt+a/W4Zp6z2X P8b8uSPbXVsk2NoM7SmArGm5TrW4UFY1CDBr/y1cmexsvR++/DCunjp4NZSXc+6mCU+d xqKBAIbaJIqw9Ca7b2c4fSKdxm/QO9awbcTYv+3NvLNWijxQnslySbRSAbcT2vCshYYD AbkQ== 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=/3fwFlSHqv2IY2cfVIX6errvz53aKyNRTpbYbvgRhac=; b=KavU0Yw7xNuTdgCGNSiyGD3r2PiNziYcfOxrvXo1CH9y0FY3rzDAF1MR2ya+l7jAII XrPKxttPinmfMQLQLziCSSsroB7abQUA+jX1bXXVkm06uiSLYbD7KRanO9hel8Ei8Qxv O6IpYxReIyLoyAnLtxw30UpozdAqlHnDZpxe/ByCVG7bBIQI5KK5PWGOhV8/88tvSpuB ppKVD8/i9AH+8Z5Sl7Rm8J5R36sHAeP2CUwd2P4Ly1GmjD073M81taSTbsDZppustT76 bCabcovC8Ffjm3uOQW8CFUz2yKsQmVNNKYH7k8LSVj+3ONeRH4TYynu2Ec9g4uQvO+eD IndQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=yHk8yGMS; 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 e8si79497pgp.4.2018.02.02.11.07.52; Fri, 02 Feb 2018 11:08: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=yHk8yGMS; 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 S1753910AbeBBSFo (ORCPT + 99 others); Fri, 2 Feb 2018 13:05:44 -0500 Received: from vern.gendns.com ([206.190.152.46]:48539 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752513AbeBBSFH (ORCPT ); Fri, 2 Feb 2018 13:05:07 -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=/3fwFlSHqv2IY2cfVIX6errvz53aKyNRTpbYbvgRhac=; b=yHk8yGMSGw3QoeJRknV8H/RUws Ua0awSnjvUn+7aXgOBUAmvZBo3BlPUHVfSsevfMWMj6GpgNpnTF2U5tWJJm2oWqRQFhOmfhdyG4Vn fWpv2ydppsG7RFZH4zxDQkISey20gIGNaaz695hSeKUHW0fS9VrBySQCliDthgzKgSjyjtgPn/T9e Pwz/DAXf7eB0LLr+zIga5n1qDNC3pMZn1YIzWzG0ucFfn86n2jXGqYbuSjGpUck0TdRWVmge3bXDV l+dnmnd49nMR1FS7wZW3nb2Mv8Z/Ve81ehvXPaC+muYF1XzGCvhIymhKzhssDydd6lktLfj7kdxtU UalmCaQA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:57054 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 1ehfh9-001n85-4X; Fri, 02 Feb 2018 13:04:15 -0500 Subject: Re: [PATCH v6 21/41] ARM: da850: add new clock init using common clock framework 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-22-git-send-email-david@lechnology.com> <73d2c30d-ee86-1269-dd4b-1ebfe88a3149@ti.com> From: David Lechner Message-ID: Date: Fri, 2 Feb 2018 12:05:08 -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: <73d2c30d-ee86-1269-dd4b-1ebfe88a3149@ti.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 08:20 AM, Sekhar Nori wrote: > On Saturday 20 January 2018 10:44 PM, David Lechner wrote: >> void __init da850_init_time(void) >> { >> +#ifdef CONFIG_COMMON_CLK >> + void __iomem *pll0, *pll1, *psc0, *psc1; >> + struct regmap *cfgchip; >> + struct clk *clk; >> + struct clk_hw *parent; >> + >> + pll0 = ioremap(DA8XX_PLL0_BASE, SZ_4K); >> + pll1 = ioremap(DA850_PLL1_BASE, SZ_4K); >> + psc0 = ioremap(DA8XX_PSC0_BASE, SZ_4K); >> + psc1 = ioremap(DA8XX_PSC1_BASE, SZ_4K); >> + >> + cfgchip = da8xx_register_cfgchip(); >> + if (WARN(IS_ERR(cfgchip), "failed to register CFGCHIP syscon")) >> + return; >> + >> + clk_register_fixed_rate(NULL, "ref_clk", NULL, 0, DA850_REF_FREQ); >> + >> + da850_pll_clk_init(pll0, pll1); >> + >> + da8xx_cfgchip_register_div4p5(cfgchip); >> + >> + da8xx_cfgchip_register_async1(cfgchip); >> + >> + clk = clk_register_fixed_factor(NULL, "async2", "pll0_auxclk", 0, 1, 1); >> + clk_register_clkdev(clk, NULL, "i2c_davinci.1"); >> + clk_register_clkdev(clk, "timer0", NULL); >> + clk_register_clkdev(clk, NULL, "davinci-wdt"); > > I think its better to get these clkdevs registered in > da850_pll_clk_init() itself. Sounds good to me. > >> + >> + clk = da8xx_cfgchip_register_async3(cfgchip); >> + >> + /* pll1_sysclk2 is not affected by CPU scaling, so use it for async3 */ >> + parent = clk_hw_get_parent_by_index(__clk_get_hw(clk), 1); >> + if (parent) >> + clk_set_parent(clk, parent->clk); >> + else >> + pr_warn("%s: Failed to find async3 parent clock\n", __func__); >> + >> + da850_psc_clk_init(psc0, psc1); >> + >> + clk = clk_register_fixed_factor(NULL, "rmii", "pll0_sysclk7", 0, 1, 1); >> + clk_register_clkdev(clk, "rmii", NULL); > > Like in da830, can drop this rmii clock, I think. > > Thanks, > Sekhar >