linux-stable/drivers/clk/mmp
Boris Brezillon 0817b62cc0 clk: change clk_ops' ->determine_rate() prototype
Clock rates are stored in an unsigned long field, but ->determine_rate()
(which returns a rounded rate from a requested one) returns a long
value (errors are reported using negative error codes), which can lead
to long overflow if the clock rate exceed 2Ghz.

Change ->determine_rate() prototype to return 0 or an error code, and pass
a pointer to a clk_rate_request structure containing the expected target
rate and the rate constraints imposed by clk users.

The clk_rate_request structure might be extended in the future to contain
other kind of constraints like the rounding policy, the maximum clock
inaccuracy or other things that are not yet supported by the CCF
(power consumption constraints ?).

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
CC: Jonathan Corbet <corbet@lwn.net>
CC: Tony Lindgren <tony@atomide.com>
CC: Ralf Baechle <ralf@linux-mips.org>
CC: "Emilio López" <emilio@elopez.com.ar>
CC: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
CC: Peter De Schrijver <pdeschrijver@nvidia.com>
CC: Prashant Gaikwad <pgaikwad@nvidia.com>
CC: Stephen Warren <swarren@wwwdotorg.org>
CC: Thierry Reding <thierry.reding@gmail.com>
CC: Alexandre Courbot <gnurou@gmail.com>
CC: linux-doc@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: linux-arm-kernel@lists.infradead.org
CC: linux-omap@vger.kernel.org
CC: linux-mips@linux-mips.org
CC: linux-tegra@vger.kernel.org
[sboyd@codeaurora.org: Fix parent dereference problem in
__clk_determine_rate()]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[sboyd@codeaurora.org: Folded in fix from Heiko for fixed-rate
clocks without parents or a rate determining op]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2015-07-27 18:12:01 -07:00
..
clk-apbc.c clk: mmp: Silence sparse warnings 2015-05-14 17:11:29 -07:00
clk-apmu.c clk: mmp: Silence sparse warnings 2015-05-14 17:11:29 -07:00
clk-frac.c clk: mmp: fix sparse non static symbol warning 2014-12-11 12:14:09 -08:00
clk-gate.c clk: mmp: add mmp private gate clock 2014-11-12 16:34:00 -08:00
clk-mix.c clk: change clk_ops' ->determine_rate() prototype 2015-07-27 18:12:01 -07:00
clk-mmp2.c clk: mmp: Fix the wrong factor table for uart PLL 2015-06-04 12:07:49 -07:00
clk-of-mmp2.c clk: mmp: add timer clock for pxa168/mmp2/pxa910 2015-06-04 12:07:53 -07:00
clk-of-pxa168.c clk: mmp: add timer clock for pxa168/mmp2/pxa910 2015-06-04 12:07:53 -07:00
clk-of-pxa910.c clk: mmp: add timer clock for pxa168/mmp2/pxa910 2015-06-04 12:07:53 -07:00
clk-of-pxa1928.c clk: mmp: add PXA1928 clock support 2015-05-15 12:31:45 -07:00
clk-pxa168.c clk: mmp: add spin lock for clk-frac 2014-11-12 16:33:37 -08:00
clk-pxa910.c clk: mmp: add spin lock for clk-frac 2014-11-12 16:33:37 -08:00
clk.c clk: mmp: add basic support functions for DT support 2014-11-12 16:34:05 -08:00
clk.h clk: mmp: add basic support functions for DT support 2014-11-12 16:34:05 -08:00
Makefile clk: mmp: add PXA1928 clock support 2015-05-15 12:31:45 -07:00
reset.c clk: mmp: add reset support 2014-11-12 16:34:10 -08:00
reset.h clk: mmp: add reset support 2014-11-12 16:34:10 -08:00