Re: [PATCH] clk: vf610: improve handling case that cpu frequency can't be changed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 27, 2019 at 3:09 AM Heiner Kallweit <hkallweit1@xxxxxxxxx> 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 <hkallweit1@xxxxxxxxx>

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 <andrew.smirnov@xxxxxxxxx>

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux