On Sat, Apr 27, 2019 at 3:09 AM Heiner Kallweit <[email protected]> wrote:
>
> Currently we get a nasty error message if the cpu clock can't be
> changed:
> DDRC is clocked by PLL1, can't switch CPU clockinitcall 
> vf610_switch_cpu_clock+0x1/0x198 failed: Invalid argument
>
> So let's do the following:
> - factor out the check from vf610_switch_cpu_clock_to_500mhz() and
>   vf610_switch_cpu_clock_to_400mhz
> - if clock can't be changed, don't treat it as an error
> - don't call clock notifier chain if clock can't be changed
> - add trailing newline to the warning message
>
> Signed-off-by: Heiner Kallweit <[email protected]>

Minor nit: it might've been a bit simpler to create
vf610_cpu_clk_unchangable(), so you wouldn't have to invert the result
in every usecase.

Regardless the code is fine as is as, so:

Reviewed-by: Andrey Smirnov <[email protected]>

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to