linux-hardened/drivers/clk/qcom
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-branch.c clk: qcom: Add support for branches/gate clocks 2014-01-16 12:01:01 -08:00
clk-branch.h clk: qcom: Add support for branches/gate clocks 2014-01-16 12:01:01 -08:00
clk-pll.c clk: change clk_ops' ->determine_rate() prototype 2015-07-27 18:12:01 -07:00
clk-pll.h clk: qcom: Add support for setting rates on PLLs 2014-09-22 15:16:53 -07:00
clk-rcg.c clk: change clk_ops' ->determine_rate() prototype 2015-07-27 18:12:01 -07:00
clk-rcg.h clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
clk-rcg2.c clk: change clk_ops' ->determine_rate() prototype 2015-07-27 18:12:01 -07:00
clk-regmap-divider.c clk: qcom: Add support for regmap divider clocks 2015-01-27 11:49:00 -08:00
clk-regmap-divider.h clk: qcom: Add support for regmap divider clocks 2015-01-27 11:49:00 -08:00
clk-regmap-mux.c clk: qcom: Add simple regmap based muxes 2015-01-27 11:49:09 -08:00
clk-regmap-mux.h clk: qcom: Add simple regmap based muxes 2015-01-27 11:49:09 -08:00
clk-regmap.c clk: qcom: Add a regmap type clock struct 2014-01-16 12:00:58 -08:00
clk-regmap.h clk: qcom: Add a regmap type clock struct 2014-01-16 12:00:58 -08:00
common.c clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
common.h clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
gcc-apq8084.c clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
gcc-ipq806x.c clk: qcom: Add support for NSS/GMAC clocks and resets 2015-05-30 17:04:36 -07:00
gcc-msm8660.c clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
gcc-msm8916.c clk: qcom: Fix MSM8916 gfx3d_clk_src configuration 2015-04-30 18:42:55 -07:00
gcc-msm8960.c clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
gcc-msm8974.c clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
Kconfig clk: qcom: fix driver dependencies 2015-04-07 16:14:54 -07:00
lcc-ipq806x.c clk: qcom: Fix ipq806x LCC frequency tables 2015-03-26 22:43:30 -07:00
lcc-msm8960.c clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
Makefile clk: qcom: Add MSM8916 Global Clock Controller support 2015-03-23 16:09:22 -07:00
mmcc-apq8084.c clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
mmcc-msm8960.c clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
mmcc-msm8974.c clk: qcom: Introduce parent_map tables 2015-03-23 16:09:19 -07:00
reset.c clk: qcom: Add reset controller support 2014-01-16 12:01:02 -08:00
reset.h clk: qcom: Add reset controller support 2014-01-16 12:01:02 -08:00