2022-07-14 20:44:43

by Marijn Suijten

[permalink] [raw]
Subject: [PATCH] clk: qcom: gcc-sdm660: Use floor ops for SDCC1 clock

In commit 3f905469c8ce ("clk: qcom: gcc: Use floor ops for SDCC clocks")
floor ops were applied to SDCC2 only, but flooring is also required on
the SDCC1 apps clock which is used by the eMMC card on Sony's Nile
platform, and otherwise result in the typicial "Card appears
overclocked" warnings observed on many other platforms before:

mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz
mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz
mmc0: Card appears overclocked; req 104000000 Hz, actual 192000000 Hz

Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for SDM660")
Signed-off-by: Marijn Suijten <[email protected]>
---
drivers/clk/qcom/gcc-sdm660.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/gcc-sdm660.c b/drivers/clk/qcom/gcc-sdm660.c
index 429d12193146..04b427b577a1 100644
--- a/drivers/clk/qcom/gcc-sdm660.c
+++ b/drivers/clk/qcom/gcc-sdm660.c
@@ -743,7 +743,7 @@ static struct clk_rcg2 sdcc1_apps_clk_src = {
.name = "sdcc1_apps_clk_src",
.parent_data = gcc_parent_data_xo_gpll0_gpll4_gpll0_early_div,
.num_parents = ARRAY_SIZE(gcc_parent_data_xo_gpll0_gpll4_gpll0_early_div),
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_floor_ops,
},
};

--
2.37.1


2022-07-28 01:15:57

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH] clk: qcom: gcc-sdm660: Use floor ops for SDCC1 clock

Quoting Marijn Suijten (2022-07-14 13:38:22)
> In commit 3f905469c8ce ("clk: qcom: gcc: Use floor ops for SDCC clocks")
> floor ops were applied to SDCC2 only, but flooring is also required on
> the SDCC1 apps clock which is used by the eMMC card on Sony's Nile
> platform, and otherwise result in the typicial "Card appears
> overclocked" warnings observed on many other platforms before:
>
> mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz
> mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz
> mmc0: Card appears overclocked; req 104000000 Hz, actual 192000000 Hz
>
> Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for SDM660")
> Signed-off-by: Marijn Suijten <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2022-08-04 01:43:55

by Alexey Minnekhanov

[permalink] [raw]
Subject: Re: [PATCH] clk: qcom: gcc-sdm660: Use floor ops for SDCC1 clock

On 7/14/22 23:38, Marijn Suijten wrote:
> In commit 3f905469c8ce ("clk: qcom: gcc: Use floor ops for SDCC clocks")
> floor ops were applied to SDCC2 only, but flooring is also required on
> the SDCC1 apps clock which is used by the eMMC card on Sony's Nile
> platform, and otherwise result in the typicial "Card appears
> overclocked" warnings observed on many other platforms before:
>
> mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz
> mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz
> mmc0: Card appears overclocked; req 104000000 Hz, actual 192000000 Hz
>
> Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for SDM660")
> Signed-off-by: Marijn Suijten <[email protected]>
>

Tried this on my SDM660 xiaomi-lavender, warnings are gone, thanks!

Tested-by: Alexey Minnekhanov <[email protected]>

2022-08-30 00:31:17

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH] clk: qcom: gcc-sdm660: Use floor ops for SDCC1 clock

On Thu, 14 Jul 2022 22:38:22 +0200, Marijn Suijten wrote:
> In commit 3f905469c8ce ("clk: qcom: gcc: Use floor ops for SDCC clocks")
> floor ops were applied to SDCC2 only, but flooring is also required on
> the SDCC1 apps clock which is used by the eMMC card on Sony's Nile
> platform, and otherwise result in the typicial "Card appears
> overclocked" warnings observed on many other platforms before:
>
> mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz
> mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz
> mmc0: Card appears overclocked; req 104000000 Hz, actual 192000000 Hz
>
> [...]

Applied, thanks!

[1/1] clk: qcom: gcc-sdm660: Use floor ops for SDCC1 clock
commit: 6956c18f4ad9200aa945f7ea37d65a05afc49d51

Best regards,
--
Bjorn Andersson <[email protected]>