Received: by 10.223.176.5 with SMTP id f5csp800470wra; Fri, 2 Feb 2018 06:23:10 -0800 (PST) X-Google-Smtp-Source: AH8x2247M5eVuLQyrhMQQIHjeIM0vnS0dPnCXtwbCoR1mcwD3KZFCscT2tjNjtYm/hsw12gpw39I X-Received: by 10.101.80.69 with SMTP id k5mr21140441pgo.425.1517581390570; Fri, 02 Feb 2018 06:23:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517581390; cv=none; d=google.com; s=arc-20160816; b=nm5ORa9aT8JruLMq0C4ydPd/qEKUDLg9vI97KN+uM8TSH+urc6b+XDmtyNb23fMMse uP6syhRzKAlKpWX+POv8Fc50I0aQJwqJ4zddVYoV/tIeiiC/pQRD6xPYEuBgEV8yzSJc 7EN1hBrT6v77b8/tYJtrWTxUnPakhBjJJVWkH4GqBDA+coAhVV8e8JPeWtsRjyBLtNWs XVU+qHJ+kA4j6JQXMTcRvXCZ3smTW8fHOsDxHB9uoZgf7/vlbmofulAaWiBR0vexKqz0 AFS1DuUzse2onTWdZoUdAHrCUcwRDYNug/p4t4yJZkLXwy5BkaMDNXhf3AgYxxDMtuj1 YTOg== 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=vXEYpGMkrlF2gKmwtFX5T6yrmUwCEcvQ6tcIrqNLMHY=; b=nBOBsj7sMcS8ZNxQVcZXaOtQYSs1pqwBSpa31nyADrsIWPgQ+uwT81F0/if89U0+Gm nwiDa/x4PAJ0kEitawJvBNonCBQG0GRXd65DKEBDl+KKaQDl/4SDfDdeBq3TqXU2hB+u giY/8Rx5rLBcMSLrCu9E7WQ3rg/z5aPi1XHJG0hC3bjglvvn8RrCwuVi1PMJZsEg7p+e EKWQTGsQgb9jRyed7ABHY0rHs2yPhaNJlo08S0JEbC4HhbHShim9bxb8D1WaZNL7XJ9E LBVAkRmGR6Y4kr3GBkHEvC5hKSJNM5H1Z4vPl6XrF9S8nGYhh9rVmlTvCrYU3F7fPR2t jleg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=b0MReKJc; 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 t13-v6si1938773plr.411.2018.02.02.06.22.55; Fri, 02 Feb 2018 06:23:10 -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=b0MReKJc; 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 S1752173AbeBBOWD (ORCPT + 99 others); Fri, 2 Feb 2018 09:22:03 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:38831 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751469AbeBBOV5 (ORCPT ); Fri, 2 Feb 2018 09:21:57 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w12EKiYA031341; Fri, 2 Feb 2018 08:20:44 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517581245; bh=yKi8wpVwz4Putd9l+cg5koPjey/H0xrRPid0ChSi5yM=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=b0MReKJc1ZNNhuVTPW1wgiL6DBX05swuaXd8fdliYolkrL87CgpiFBUnwvaQur2X4 hsZQrIj4HV/LXurOgK/FO+/cFdgoTSd1zOn3jJJuzZYC5BIZwMWbyA2x8LHSd/DjQ5 7gIPniV/DioAqzpQ9LkAy9gaYulQJ6NjP3p3Ll3k= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w12EKiFD029573; Fri, 2 Feb 2018 08:20:44 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 2 Feb 2018 08:20:44 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Fri, 2 Feb 2018 08:20:44 -0600 Received: from [172.24.190.171] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w12EKdYr017628; Fri, 2 Feb 2018 08:20:40 -0600 Subject: Re: [PATCH v6 21/41] ARM: da850: add new clock init using common clock framework To: David Lechner , , , CC: Michael Turquette , Stephen Boyd , Rob Herring , Mark Rutland , Kevin Hilman , Bartosz Golaszewski , Adam Ford , References: <1516468460-4908-1-git-send-email-david@lechnology.com> <1516468460-4908-22-git-send-email-david@lechnology.com> From: Sekhar Nori Message-ID: <73d2c30d-ee86-1269-dd4b-1ebfe88a3149@ti.com> Date: Fri, 2 Feb 2018 19:50:39 +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: <1516468460-4908-22-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 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. > + > + 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