diff mbox series

clk: qcom: gcc-sdm660: Use floor ops for SDCC1 clock

Message ID 20220714203822.186448-1-marijn.suijten@somainline.org (mailing list archive)
State Accepted
Commit 6956c18f4ad9200aa945f7ea37d65a05afc49d51
Headers show
Series clk: qcom: gcc-sdm660: Use floor ops for SDCC1 clock | expand

Commit Message

Marijn Suijten July 14, 2022, 8:38 p.m. UTC
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 <marijn.suijten@somainline.org>
---
 drivers/clk/qcom/gcc-sdm660.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stephen Boyd July 28, 2022, 12:31 a.m. UTC | #1
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 <marijn.suijten@somainline.org>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Alexey Minnekhanov Aug. 4, 2022, 1:29 a.m. UTC | #2
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 <marijn.suijten@somainline.org>
>

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

Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Bjorn Andersson Aug. 29, 2022, 11:46 p.m. UTC | #3
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,
diff mbox series

Patch

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,
 	},
 };