clk: vf610: improve handling case that cpu frequency can't be changed
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@gmail.com>
Reviewed-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent f0430fb commit 5352e27eb4e2c43bc6572bf0320177683068eb8e
@Heiner Kallweit Heiner Kallweit authored on 27 Apr 2019
Sascha Hauer committed on 29 Apr 2019
Showing 1 changed file
View
drivers/clk/imx/clk-vf610.c