public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: qcom: gcc-msm8994: Fix gpll4 width
@ 2022-03-19 17:49 Konrad Dybcio
  2022-03-23 20:37 ` Petr Vorel
  2022-03-25  0:52 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Konrad Dybcio @ 2022-03-19 17:49 UTC (permalink / raw)
  To: ~postmarketos/upstreaming
  Cc: martin.botka, angelogioacchino.delregno, marijn.suijten,
	jamipkettunen, Konrad Dybcio, Petr Vorel, Andy Gross,
	Bjorn Andersson, Michael Turquette, Stephen Boyd,
	Bastian Köcher, Jeremy McNicoll, linux-arm-msm, linux-clk,
	linux-kernel

The gpll4 postdiv is actually a div4, so make sure that Linux is aware of
this.

This fixes the following error messages:

[    0.804491] mmc1: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
[    0.805057] mmc1: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz

Fixes: aec89f78cf01 ("clk: qcom: Add support for msm8994 global clock controller")

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
Cc: Petr Vorel <petr.vorel@gmail.com>

 drivers/clk/qcom/gcc-msm8994.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/qcom/gcc-msm8994.c b/drivers/clk/qcom/gcc-msm8994.c
index f09499999eb3..6b702cdacbf2 100644
--- a/drivers/clk/qcom/gcc-msm8994.c
+++ b/drivers/clk/qcom/gcc-msm8994.c
@@ -77,6 +77,7 @@ static struct clk_alpha_pll gpll4_early = {
 
 static struct clk_alpha_pll_postdiv gpll4 = {
 	.offset = 0x1dc0,
+	.width = 4,
 	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
 	.clkr.hw.init = &(struct clk_init_data){
 		.name = "gpll4",
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: qcom: gcc-msm8994: Fix gpll4 width
  2022-03-19 17:49 [PATCH] clk: qcom: gcc-msm8994: Fix gpll4 width Konrad Dybcio
@ 2022-03-23 20:37 ` Petr Vorel
  2022-03-25  0:52 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2022-03-23 20:37 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: ~postmarketos/upstreaming, martin.botka,
	angelogioacchino.delregno, marijn.suijten, jamipkettunen,
	Andy Gross, Bjorn Andersson, Michael Turquette, Stephen Boyd,
	Bastian Köcher, Jeremy McNicoll, linux-arm-msm, linux-clk,
	linux-kernel

Hi Konrad,

Reviewed-by: Petr Vorel <petr.vorel@gmail.com>


> The gpll4 postdiv is actually a div4, so make sure that Linux is aware of
> this.

> This fixes the following error messages:

> [    0.804491] mmc1: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
> [    0.805057] mmc1: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
yes, this works on my patchset [1] even without these workarounds (I'll submit
v5 without it)

+	assigned-clocks = <&gcc GPLL4_EARLY>;
+	assigned-clock-rates = <384000000>;

Tested-by: Petr Vorel <petr.vorel@gmail.com>

Kind regards,
Petr

[1] https://lore.kernel.org/linux-arm-msm/20220218203710.895-1-petr.vorel@gmail.com/

> Fixes: aec89f78cf01 ("clk: qcom: Add support for msm8994 global clock controller")

> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> ---
> Cc: Petr Vorel <petr.vorel@gmail.com>

>  drivers/clk/qcom/gcc-msm8994.c | 1 +
>  1 file changed, 1 insertion(+)

> diff --git a/drivers/clk/qcom/gcc-msm8994.c b/drivers/clk/qcom/gcc-msm8994.c
> index f09499999eb3..6b702cdacbf2 100644
> --- a/drivers/clk/qcom/gcc-msm8994.c
> +++ b/drivers/clk/qcom/gcc-msm8994.c
> @@ -77,6 +77,7 @@ static struct clk_alpha_pll gpll4_early = {

>  static struct clk_alpha_pll_postdiv gpll4 = {
>  	.offset = 0x1dc0,
> +	.width = 4,
>  	.regs = clk_alpha_pll_regs[CLK_ALPHA_PLL_TYPE_DEFAULT],
>  	.clkr.hw.init = &(struct clk_init_data){
>  		.name = "gpll4",

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: qcom: gcc-msm8994: Fix gpll4 width
  2022-03-19 17:49 [PATCH] clk: qcom: gcc-msm8994: Fix gpll4 width Konrad Dybcio
  2022-03-23 20:37 ` Petr Vorel
@ 2022-03-25  0:52 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2022-03-25  0:52 UTC (permalink / raw)
  To: Konrad Dybcio, ~postmarketos/upstreaming
  Cc: martin.botka, angelogioacchino.delregno, marijn.suijten,
	jamipkettunen, Konrad Dybcio, Petr Vorel, Andy Gross,
	Bjorn Andersson, Michael Turquette, Bastian Köcher,
	Jeremy McNicoll, linux-arm-msm, linux-clk, linux-kernel

Quoting Konrad Dybcio (2022-03-19 10:49:40)
> The gpll4 postdiv is actually a div4, so make sure that Linux is aware of
> this.
> 
> This fixes the following error messages:
> 
> [    0.804491] mmc1: Card appears overclocked; req 200000000 Hz, actual 343999999 Hz
> [    0.805057] mmc1: Card appears overclocked; req 400000000 Hz, actual 687999999 Hz
> 
> Fixes: aec89f78cf01 ("clk: qcom: Add support for msm8994 global clock controller")
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-25  0:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-19 17:49 [PATCH] clk: qcom: gcc-msm8994: Fix gpll4 width Konrad Dybcio
2022-03-23 20:37 ` Petr Vorel
2022-03-25  0:52 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox