]> git.baikalelectronics.ru Git - kernel.git/commit
ARC: get rate from clk driver instead of reading device tree
authorVlad Zakharov <Vladislav.Zakharov@synopsys.com>
Fri, 3 Mar 2017 11:30:02 +0000 (14:30 +0300)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 6 Mar 2017 04:04:59 +0000 (20:04 -0800)
commit2d5c2de70688ec51b1d8b7cda9bf27289c89157f
tree9876dd45c07e5ea0e6eded18783997c155dba2f6
parent45cc2dd9bdd1761f88522c78d20b57de6582ef5a
ARC: get rate from clk driver instead of reading device tree

We were reading clock rate directly from device tree "clock-frequency"
property of corresponding clock node in show_cpuinfo function.

Such approach is correct only in case cpu is always clocked by
"fixed-clock". If we use clock driver that allows rate to be changed
this won't work as rate may change during the time or even
"clock-frequency" property may not be presented at all.

So this commit replaces reading device tree with getting rate from clock
driver. This approach is much more flexible and will work for both fixed
and mutable clocks.

Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/setup.c