Messages in this thread | | | From | Doug Anderson <> | Date | Thu, 10 Dec 2020 13:00:45 -0800 | Subject | Re: [PATCH 1/2] clk: qcom: gcc-sc7180: Use floor ops for sdcc clks |
| |
Hi,
On Thu, Dec 10, 2020 at 12:27 PM Stephen Boyd <sboyd@kernel.org> wrote: > > Quoting Douglas Anderson (2020-12-10 10:22:38) > > I would repeat the same commit message that was in commit 5e4b7e82d497 > > ("clk: qcom: gcc-sdm845: Use floor ops for sdcc clks") but it seems > > silly to do so when you could just go read that commit. > > > > NOTE: this is actually extra terrible because we're missing the 50 MHz > > rate in the table (see the next patch AKA ("clk: qcom: gcc-sc7180: Add > > 50 MHz clock rate for SDC2")). That means then when you run an older > > SD card it'll try to clock it at 100 MHz when it's only specced to run > > at 50 MHz max. As you can probably guess that doesn't work super > > well. > > > > Signed-off-by: Douglas Anderson <dianders@chromium.org> > > Fixes: 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180") > > --- > > Taniya: can you please update whatever process is used to generate > > these clock files to use floor for SD card clocks. I hope you can > > also scour through these files looking for similar problems on other > > SoCs and submit patches for them. > > Any chance the consumer of this clk can call clk_round_rate() and WARN() > if the rate is not anywhere near what it wants it to be? I fear that > this problem will just keep coming up otherwise.
Good idea. Posted ("[PATCH] mmc: sdhci-msm: Warn about overclocking SD/MMC") [1].
I just checked for the clock being higher, not lower and I did a normal print rather than a WARN splat.
Interestingly this shows that we were also overclocking the eMMC during probe (though we end up at a proper rate in the end). I saw these transitory errors during boot:
[ 6.287870] mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz [ 6.295811] mmc0: Card appears overclocked; req 52000000 Hz, actual 100000000 Hz [ 6.312573] mmc0: Card appears overclocked; req 104000000 Hz, actual 192000000 Hz
[1] https://lore.kernel.org/r/20201210125709.1.Iec3430c7d3c2a29262695edef7b82a14aaa567e5@changeid
-Doug
| |