Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: ipq8074: Use floor ops for SDCC1 clock

Use floor ops on SDCC1 APPS clock in order to round down selected clock
frequency and avoid overclocking SD/eMMC cards.

For example, currently HS200 cards were failling tuning as they were
actually being clocked at 384MHz instead of 192MHz.
This caused some boards to disable 1.8V I/O and force the eMMC into the
standard HS mode (50MHz) and that appeared to work despite the eMMC being
overclocked to 96Mhz in that case.

There was a previous commit to use floor ops on SDCC clocks, but it looks
to have only covered SDCC2 clock.

Fixes: 9607f6224b39 ("clk: qcom: ipq8074: add PCIE, USB and SDCC clocks")

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220210173100.505128-1-robimarko@gmail.com

authored by

Dirk Buchwalder and committed by
Bjorn Andersson
b77d8306 2564aa75

+1 -1
+1 -1
drivers/clk/qcom/gcc-ipq8074.c
··· 1074 1074 .name = "sdcc1_apps_clk_src", 1075 1075 .parent_names = gcc_xo_gpll0_gpll2_gpll0_out_main_div2, 1076 1076 .num_parents = 4, 1077 - .ops = &clk_rcg2_ops, 1077 + .ops = &clk_rcg2_floor_ops, 1078 1078 }, 1079 1079 }; 1080 1080