Received: by 10.223.148.5 with SMTP id 5csp7608639wrq; Thu, 18 Jan 2018 07:27:08 -0800 (PST) X-Google-Smtp-Source: ACJfBoureg89hKJJ+zh/fGqrHLrBhkEdDkXE/d1J0vt6qsbWJp5KZjEs63OuUMrjTu1Wf4+QlmJ1 X-Received: by 10.98.238.18 with SMTP id e18mr42515530pfi.23.1516289228216; Thu, 18 Jan 2018 07:27:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516289228; cv=none; d=google.com; s=arc-20160816; b=GOZcuQ6gAlpxiU9Y8naQivFinGm4IHybZ/MKgBohjIsg4wz8bpP2xHEErcy5ZdvHnU m830xzGo1CNWAtlbgSOJOxqC33ZaGqIleh7D2Ik4DklBc/cAc/7orqOkTmoXTwqWG/pQ aF0gPfDcxI+gzCIwbzc3QHtXggMxsz/Uvc5c7+3zf6dYaPz2JL8knwnZ0okxd0+KYjMY zU15C7vozWNvHlIfueLSVo1thbq10GTWaIJMXl4h7AcNKDX1LP6Lqlj1d3FhOgMEl7qq lMGioF3tXptSkr06suD1XVOxBXdsMzrhrkhLDvaWLUctY9xLocEePkdd741uUuTmTh8N 4v+Q== 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=B7BmKjIaHgGPZEp3+FWB+H2RdodyDnJuqesVJHURgS4=; b=mqiO5NdtohvC7ptqhrPtynjl9PXK3mlXcu8BynSjm8vfnypIS0RJi4sGG9Z0pAPx2p /iD8r9qgCAepO4AhP5zo5RHtl9UWrKUb8AOMZXXY4/HZZfoYxoKR2upbWoJ5xtD8R6u4 IPwpn8+krWtqUIcz67OM3puX5X0JdkWSK0eL7+tWgW4FiNVBJ4D5n3ZI9xJrtcKAw/TY UtjPk6WY/4pcouxbdQJqyg7ybYnlw+w4l0DlhUj5SqbBPHIoXSmJ18Yk8bI4nBoWDGSN rIGFtN3euAlHdF+FGDiKD0EVl4nsOh0UAFErqz5l5lLHeEgTK1djlf7bYWUK3GFod8Vt Rm4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=s64G1iHZ; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14si6439382pgr.152.2018.01.18.07.26.54; Thu, 18 Jan 2018 07:27:08 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=s64G1iHZ; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932610AbeARPZ5 (ORCPT + 99 others); Thu, 18 Jan 2018 10:25:57 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:38314 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932302AbeARPZ4 (ORCPT ); Thu, 18 Jan 2018 10:25:56 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w0IFOpX2007673; Thu, 18 Jan 2018 09:24:51 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1516289091; bh=NCsDEkN86mWzo7SdX3BVh5d2P3Y3iqcbqaqWTB4VQFs=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=s64G1iHZCwcv6mkzLNGbVGVwLXUsPyTdJVCKLJ6Lcbo+pUatlKTHijudAmIoNovIq mvksqLlSZpeH3uQkCruMpEGYBFvLa9KWY+i3xoYdooHvIi99grVpL3NS5YtJ7+VMoy r4B7M9dc8NdPB6FzAD6z5iaJl9zWqW2WGHMAzB2g= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0IFOpcu027520; Thu, 18 Jan 2018 09:24:51 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 18 Jan 2018 09:24:50 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 18 Jan 2018 09:24:50 -0600 Received: from [172.24.190.171] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w0IFOjbS031913; Thu, 18 Jan 2018 09:24:46 -0600 Subject: Re: [PATCH v5 24/44] ARM: da850: add new clock init using common clock framework To: David Lechner , , , CC: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Adam Ford , References: <1515377863-20358-1-git-send-email-david@lechnology.com> <1515377863-20358-25-git-send-email-david@lechnology.com> From: Sekhar Nori Message-ID: <4ccda6ea-057d-11ed-84fc-a2db50b21467@ti.com> Date: Thu, 18 Jan 2018 20:54:45 +0530 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: <1515377863-20358-25-git-send-email-david@lechnology.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 08 January 2018 07:47 AM, David Lechner wrote: > +#ifndef CONFIG_COMMON_CLK > static int da850_set_armrate(struct clk *clk, unsigned long rate); > static int da850_round_armrate(struct clk *clk, unsigned long rate); > static int da850_set_pll0rate(struct clk *clk, unsigned long armrate); > @@ -583,6 +588,7 @@ static struct clk_lookup da850_clks[] = { > CLK("ecap.2", "fck", &ecap2_clk), > CLK(NULL, NULL, NULL), > }; > +#endif Don't like these temporary ifdefs (which I am sure is the case with you too). But don't have any other good idea for splitting these patches into review-able and build-able pieces. So lets go with this for now. > void __init da850_init_time(void) > { > +#ifdef CONFIG_COMMON_CLK > + void __iomem *pll0, *pll1, *psc0, *psc1; > + 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); > + > + clk_register_fixed_rate(NULL, "ref_clk", NULL, 0, DA850_REF_FREQ); Overall, this and other functions like this in this series need some more line spacing. Please add a space here.. > + da850_pll_clk_init(pll0, pll1); .. and here. > + clk = clk_register_mux(NULL, "async3", > + (const char * const[]){ "pll0_sysclk2", "pll1_sysclk2" }, > + 2, 0, DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG), > + ilog2(CFGCHIP3_ASYNC3_CLKSRC), 1, 0, NULL); .. here before the comment .. > + /* 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__); .. and here. And so on. I have not taken a closer look at mach patches. But may be you should send the next version anyway and make sure everyone is happy with the driver first. Thanks, Sekhar