]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit42b5f40610fd222a9e7100f5b77582940bfdcbde
tree1d916b102c5bfb8cf40aa4bf96eb3eb19b31fc5d
parent9baf96886780c3ec137350da3c6418c825b2dd0a
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