[PATCH 2/5] clk: prevent spurious parent rate propagation

Turquette, Mike mturquette at ti.com
Mon May 7 13:34:48 EDT 2012


On Mon, May 7, 2012 at 12:58 AM, Sascha Hauer <s.hauer at pengutronix.de> wrote:
> On Sun, May 06, 2012 at 10:08:27PM -0700, Mike Turquette wrote:
>> Patch 'clk: always pass parent_rate into .round_rate' made a subtle
>> change to the semantics of .round_rate.  It is now expected for the
>> parent's rate to always be passed in, simplifying the implemenation of
>> various .round_rate callback definitions.
>>
>> However the patch also introduced a bug in clk_calc_new_rates whereby a
>> clock without the CLK_SET_RATE_PARENT flag set could still propagate a
>> rate change up to a parent clock if the the .round_rate callback
>> modified the &best_parent_rate value in any way.
>>
>> This patch fixes the issue at the framework level (in
>> clk_calc_new_rates) by specifically handling the case where the
>> CLK_SET_RATE_PARENT flag is not set.
>>
>> Signed-off-by: Mike Turquette <mturquette at linaro.org>
>> Reported-by: Sascha Hauer<s.hauer at pengutronix.de>
>
> I think a warning might be useful when a clk driver tries to change the
> parent rate even if it is not allowed to. This can be added in a later
> patch, so
>

A fine idea.

> Acked-by: Sascha Hauer <s.hauer at pengutronix.de>
>

Thanks,
Mike



More information about the linux-arm-kernel mailing list