All SPEAr SoC's contain PLLs. Their Fout is derived based on following equations
- In normal mode
vco = (2 * M[15:8] * Fin)/N
- In Dithered mode
vco = (2 * M[15:0] * Fin)/(256 * N)
pll_rate = vco/2^p
vco and pll are very closely bound to each other,
"vco needs to program: mode, m & n" and "pll needs to program p",
both share common enable/disable logic and registers.
This patch adds in support for this type of clock.
Signed-off-by: Viresh Kumar <[email protected]>
Reviewed-by: Mike Turquette <[email protected]>
Shawn Guo <[email protected]> writes:
mxs common clk porting for v3.5. It depends on the following two branches.
[1] git://git.linaro.org/people/mturquette/linux.git clk-next
[2] http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm.git clkdev
As the mxs device tree conversion will constantly touch clock files,
to save the conflicts, the updated mxs/dt branch coming later will
based on this pull-request.
* 'clk/mxs' of git://git.linaro.org/people/shawnguo/linux-2.6:
ARM: mxs: remove now unused timer_clk argument from mxs_timer_init
ARM: mxs: remove old clock support
ARM: mxs: switch to common clk framework
ARM: mxs: change the lookup name for fec phy clock
ARM: mxs: request clock for timer
clk: mxs: add clock support for imx28
clk: mxs: add clock support for imx23
clk: mxs: add mxs specific clocks
Includes an update to Linux 3.4-rc6
Conflicts:
drivers/clk/Makefile
Signed-off-by: Arnd Bergmann <[email protected]>
Having fixed factors/dividers in hardware is a common pattern, so
add a basic clock type doing this. It basically describes a fixed
factor clock using a nominator and a denominator.
Signed-off-by: Sascha Hauer <[email protected]>
Reviewed-by: Viresh Kumar <[email protected]>
Tested-by: Shawn Guo <[email protected]>
[[email protected]: constify parent_names in static init macro]
[[email protected]: copy/paste bug from mux in static init macro]
[[email protected]: fix error handling in clk_register_fixed_factor]
[[email protected]: improve division accuracy; thanks to Saravana]
Signed-off-by: Mike Turquette <[email protected]>
The common clock framework defines a common struct clk useful across
most platforms as well as an implementation of the clk api that drivers
can use safely for managing clocks.
The net result is consolidation of many different struct clk definitions
and platform-specific clock framework implementations.
This patch introduces the common struct clk, struct clk_ops and an
implementation of the well-known clock api in include/clk/clk.h.
Platforms may define their own hardware-specific clock structure and
their own clock operation callbacks, so long as it wraps an instance of
struct clk_hw.
See Documentation/clk.txt for more details.
This patch is based on the work of Jeremy Kerr, which in turn was based
on the work of Ben Herrenschmidt.
Signed-off-by: Mike Turquette <[email protected]>
Signed-off-by: Mike Turquette <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Tested-by: Andrew Lunn <[email protected]>
Reviewed-by: Rob Herring <rob.herring <at> calxeda.com>
Cc: Russell King <[email protected]>
Cc: Jeremy Kerr <[email protected]>
Cc: Arnd Bergman <[email protected]>
Cc: Paul Walmsley <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Richard Zhao <[email protected]>
Cc: Saravana Kannan <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Amit Kucheria <[email protected]>
Cc: Deepak Saxena <[email protected]>
Cc: Grant Likely <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
factorise some generic infrastructure to assist looking up struct clks
for the ARM & SH architecture.
as the code is identical at 99%
put the arch specific code for allocation as example in asm/clkdev.h
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Acked-by: Paul Mundt <[email protected]>
Signed-off-by: Russell King <[email protected]>