linux_dsm_epyc7002/drivers/clk
Thomas Petazzoni ee2d8ea1e9 clk: mvebu: extend clk-cpu for dynamic frequency scaling
This commit extends the existing clk-cpu driver used on Marvell Armada
XP platforms to support the dynamic frequency scaling of the CPU
clock. Non-dynamic frequency change was already supported (and used
before secondary CPUs are started), but the dynamic frequency change
requires a completely different procedure.

In order to achieve this, the clk_cpu_set_rate() function is reworked
to handle two separate cases:

 - The case where the clock is enabled, which is the new dynamic
   frequency change code, implemented in clk_cpu_on_set_rate(). This
   part will be used for cpufreq activities.

 - The case where the clock is disabled, which is the existing
   frequency change code, moved in clk_cpu_off_set_rate(). This part
   is already used to set the clock frequency of the secondary CPUs
   before starting them.

In order to implement the dynamic frequency change function, we need
to access the PMU DFS registers, which are outside the currently
mapped "Clock Complex" registers, so a new area of registers is now
mapped. This affects the Device Tree binding, but we are careful to do
it in a backward-compatible way (by allowing the second pair of
registers to be non-existent, and in this case, ensuring
clk_cpu_on_set_rate() returns an error).

Note that technically speaking, the clk_cpu_on_set_rate() does not do
the entire procedure needed to change the frequency dynamically, as it
involves touching a number of PMSU registers. This is done through a
clock notifier registered by the PMSU driver in followup commits.

Cc: <devicetree@vger.kernel.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1404920715-19834-4-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2014-07-16 12:58:38 +00:00
..
at91 clk: at91: add slow clks driver 2014-05-07 18:27:45 +02:00
bcm clk: bcm/kona: implement determine_rate() 2014-05-27 17:34:32 -07:00
berlin clk: berlin: add core clock driver for BG2Q 2014-05-29 09:30:19 -07:00
hisilicon clk: hisi: add clk-hix5hd2.c 2014-05-12 11:30:32 +08:00
keystone
mmp clk: mmp: try to use closer one when do round rate 2014-03-26 20:59:27 -07:00
mvebu clk: mvebu: extend clk-cpu for dynamic frequency scaling 2014-07-16 12:58:38 +00:00
mxs
qcom clk: qcom: Return error pointers for unimplemented clocks 2014-05-29 09:30:25 -07:00
rockchip clk: rockchip: fix function type for CLK_OF_DECLARE 2014-05-20 14:25:22 -05:00
samsung The clock framework changes for 3.16 are pretty typical: mostly clock 2014-06-07 20:27:30 -07:00
shmobile clk: shmobile: Add R8A7740-specific clock support 2014-05-23 13:38:25 -07:00
sirf clk: sirf: update copyright years to 2014 2014-03-26 21:47:35 -07:00
socfpga Adds support getting the divider registers for the MAIN PLL that was once 2014-05-12 19:11:13 -07:00
spear
st clk: st: Terminate of match table 2014-05-28 12:08:53 -07:00
sunxi clk: sunxi: add PRCM (Power/Reset/Clock Management) clks support 2014-06-11 10:25:02 +02:00
tegra Merge branch 'clk-fixes' into clk-next 2014-05-28 00:15:10 -07:00
ti This pull request contains the second half the of the clk changes for 2014-06-15 16:02:20 -10:00
ux500
versatile The clock framework changes for 3.16 are pretty typical: mostly clock 2014-06-07 20:27:30 -07:00
x86
zynq clk: zynq: Leave debug clocks in bootup state 2014-04-22 13:10:18 +02:00
clk-axi-clkgen.c
clk-axm5516.c clk: Add clock driver for AXM55xx SoC 2014-05-22 22:06:14 -07:00
clk-bcm2835.c
clk-composite.c
clk-devres.c
clk-divider.c clk: divider: Fix overflow in clk_divider_bestdiv 2014-05-27 19:16:24 -07:00
clk-efm32gg.c
clk-fixed-factor.c
clk-fixed-rate.c
clk-fractional-divider.c clk: new basic clk type for fractional divider 2014-05-20 13:34:02 +02:00
clk-gate.c
clk-highbank.c
clk-ls1x.c
clk-max77686.c
clk-moxart.c
clk-mux.c
clk-nomadik.c
clk-nspire.c
clk-ppc-corenet.c
clk-s2mps11.c clk: s2mps11: Add support for S2MPS14 clocks 2014-05-23 15:44:03 -07:00
clk-si570.c clk: si570: Fix email address specifiction 2014-05-20 16:18:18 +02:00
clk-si5351.c
clk-si5351.h
clk-twl6040.c
clk-u300.c clk: u300: Terminate of match table 2014-05-27 18:29:04 -07:00
clk-vt8500.c
clk-wm831x.c
clk-xgene.c
clk.c clk: export __clk_round_rate for providers 2014-06-03 10:38:16 -07:00
clk.h clk: Add of_clk_get_by_clkspec() helper 2014-05-22 15:54:59 -07:00
clkdev.c clk: Add of_clk_get_by_clkspec() helper 2014-05-22 15:54:59 -07:00
Kconfig The clock framework changes for 3.16 are pretty typical: mostly clock 2014-06-07 20:27:30 -07:00
Makefile The clock framework changes for 3.16 are pretty typical: mostly clock 2014-06-07 20:27:30 -07:00