]> git.baikalelectronics.ru Git - kernel.git/commit
clk: mvebu: extend common code to allow an optional refclk
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 3 Mar 2015 14:41:08 +0000 (15:41 +0100)
committerGregory CLEMENT <gregory.clement@free-electrons.com>
Wed, 4 Mar 2015 14:18:48 +0000 (15:18 +0100)
commitff262419407c3641ac7044849bf40d47e3ff0808
tree1d916b102c5bfb8cf40aa4bf96eb3eb19b31fc5d
parent354e9f573ebd58ccd4eb2476631f081c6893a920
clk: mvebu: extend common code to allow an optional refclk

The Armada 39x, contrary to its predecessor, has a configurable
reference clock frequency, of either 25 Mhz, or 40 Mhz. For the
previous SoCs, it was fixed to 25 Mhz and described directly as such
in the Device Tree.

For Armada 39x, we need to read certain registers to know whether the
frequency is 25 or 40 Mhz. Therefore, this commit extends the common
mvebu clock code to allow the SoC-specific code to say it wants to
register a reference clock, by giving a non-NULL ->get_refclk_freq()
function pointer in its coreclk_soc_desc structure.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
drivers/clk/mvebu/common.c
drivers/clk/mvebu/common.h