[PATCH v2 1/9] mmc: meson-gx: fix setting f_min

Heiner Kallweit hkallweit1 at gmail.com
Sun Feb 5 07:15:08 PST 2017


Am 05.02.2017 um 02:28 schrieb Martin Blumenstingl:
> On Sat, Feb 4, 2017 at 11:12 PM, Heiner Kallweit <hkallweit1 at gmail.com> wrote:
> [snip]
>> Requesting 100kHz resulted in f_min = 0 in my tests. Same for 200kHz
>> and 300 kHz. 400kHz results in f_min = 400kHz with actual rate = 380kHz.
>> 380kHz = 24MHz / 63 is the lowest possible frequency on Meson anyway.
>> All requested frequencies below this value seem to be rounded down to 0.
> doesn't that sound more like an issue with the clock configuration
> which should be investigated? the divider for example has
> CLK_DIVIDER_ROUND_CLOSEST set, removing that will probably make it
> round up (but I'm not sure if that would break other things).
> 
IMHO rounding down makes sense as it prevents the system from silently
setting a frequency higher than requested.

In case we would prefer rounding to closest frequency, most likely
we would have to replace the default ops in init.ops = &clk_mux_ops;
with ops using __clk_mux_determine_rate_closest.

Heiner
> 
> Martin
> 




More information about the linux-amlogic mailing list