From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter De Schrijver Subject: Re: [PATCH] clk: tegra30: fix cclk_lp divisor register Date: Tue, 19 Sep 2017 11:54:59 +0300 Message-ID: <20170919085459.GL6290@tbergstrom-lnx.Nvidia.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Prashant Gaikwad , Michael Turquette , Stephen Boyd , Thierry Reding , Jonathan Hunter , linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-tegra@vger.kernel.org On Tue, Sep 19, 2017 at 04:48:10AM +0200, Michał Mirosław wrote: > According to comments in code and common sense, cclk_lp uses its > own divisor, not cclk_g's. > Acked-By: Peter De Schrijver Note that we model multiple clocks which touch the same hw register which will likely not work if you would use more than one of them. So probably this needs to be refactored somehow. The clock topology is rather odd though as the divider only applies to certain inputs for cclk_lp. > Fixes: b08e8c0ecc42 ("clk: tegra: add clock support for Tegra30") > Signed-off-by: Michał Mirosław > --- > drivers/clk/tegra/clk-tegra30.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c > index 8f5a3e7c3bf9..95b7df4a8abd 100644 > --- a/drivers/clk/tegra/clk-tegra30.c > +++ b/drivers/clk/tegra/clk-tegra30.c > @@ -964,7 +964,7 @@ static void __init tegra30_super_clk_init(void) > * U71 divider of cclk_lp. > */ > clk = tegra_clk_register_divider("pll_p_out3_cclklp", "pll_p_out3", > - clk_base + SUPER_CCLKG_DIVIDER, 0, > + clk_base + SUPER_CCLKLP_DIVIDER, 0, > TEGRA_DIVIDER_INT, 16, 8, 1, NULL); > clk_register_clkdev(clk, "pll_p_out3_cclklp", NULL); > > -- > 2.11.0 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-clk" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 19 Sep 2017 11:54:59 +0300 From: Peter De Schrijver To: =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= CC: Prashant Gaikwad , Michael Turquette , Stephen Boyd , "Thierry Reding" , Jonathan Hunter , , Subject: Re: [PATCH] clk: tegra30: fix cclk_lp divisor register Message-ID: <20170919085459.GL6290@tbergstrom-lnx.Nvidia.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In-Reply-To: Return-Path: pdeschrijver@nvidia.com List-ID: On Tue, Sep 19, 2017 at 04:48:10AM +0200, Micha=C5=82 Miros=C5=82aw wrote: > According to comments in code and common sense, cclk_lp uses its > own divisor, not cclk_g's. >=20 Acked-By: Peter De Schrijver Note that we model multiple clocks which touch the same hw register which will likely not work if you would use more than one of them. So probably this needs to be refactored somehow. The clock topology is rather odd though as the divider only applies to certain inputs for cclk_lp. > Fixes: b08e8c0ecc42 ("clk: tegra: add clock support for Tegra30") > Signed-off-by: Micha=C5=82 Miros=C5=82aw > --- > drivers/clk/tegra/clk-tegra30.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegr= a30.c > index 8f5a3e7c3bf9..95b7df4a8abd 100644 > --- a/drivers/clk/tegra/clk-tegra30.c > +++ b/drivers/clk/tegra/clk-tegra30.c > @@ -964,7 +964,7 @@ static void __init tegra30_super_clk_init(void) > * U71 divider of cclk_lp. > */ > clk =3D tegra_clk_register_divider("pll_p_out3_cclklp", "pll_p_out3", > - clk_base + SUPER_CCLKG_DIVIDER, 0, > + clk_base + SUPER_CCLKLP_DIVIDER, 0, > TEGRA_DIVIDER_INT, 16, 8, 1, NULL); > clk_register_clkdev(clk, "pll_p_out3_cclklp", NULL); > =20 > --=20 > 2.11.0 >=20 > -- > To unsubscribe from this list: send the line "unsubscribe linux-clk" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html