cascardo/linux.git
8 years agoclk: pxa: fix core frequency reporting unit
Robert Jarzmik [Sun, 12 Jul 2015 20:49:53 +0000 (22:49 +0200)]
clk: pxa: fix core frequency reporting unit

Legacy drivers which are not yet ported, such as cpufreq-pxa[23]xx, rely
on pxaXXx_get_clk_frequency_khz() to find the CPU core frequency.

This reporting was broken because the expected unit is kHz and not
Hz. Fix the reporting for pxa25x, pxa27x and pxa3xx.

Fixes: fe7710fae477 ("clk: add pxa25x clock drivers")
Fixes: d40670dc6169 ("clk: add pxa27x clock drivers")
Fixes: 9bbb8a338fb2 ("clk: pxa: add pxa3xx clock driver")
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: rockchip: Fix PLL bandwidth
Douglas Anderson [Tue, 21 Jul 2015 20:41:23 +0000 (13:41 -0700)]
clk: rockchip: Fix PLL bandwidth

In the TRM we see that BWADJ is "a 12-bit bus that selects the values
1-4096 for the bandwidth divider (NB)":
 NB = BWADJ[11:0] + 1
The recommended setting of NB: NB = NF / 2.

So:
  NB = NF / 2
  BWADJ[11:0] + 1 = NF / 2
  BWADJ[11:0] = NF / 2 - 1

Right now, we have:

{                                               \
        .rate   = _rate##U,                     \
        .nr = _nr,                              \
        .nf = _nf,                              \
        .no = _no,                              \
        .bwadj = (_nf >> 1),                    \
}

That means we set bwadj to NF / 2, not NF / 2 - 1

All of this is a bit confusing because we specify "NR" (the 1-based
value), "NF" (the 1-based value), "NO" (the 1-based value), but
"BWADJ" (the 0-based value) instead of "NB" (the 1-based value).

Let's change to working with "NB" and fix the off by one error.  This
may affect PLL jitter in a small way (hopefully for the better).

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMerge branch 'cleanup-clk-h-includes' into clk-next
Stephen Boyd [Tue, 21 Jul 2015 18:22:42 +0000 (11:22 -0700)]
Merge branch 'cleanup-clk-h-includes' into clk-next

* cleanup-clk-h-includes: (62 commits)
  clk: Remove clk.h from clk-provider.h
  clk: h8300: Remove clk.h and clkdev.h includes
  clk: at91: Include clk.h and slab.h
  clk: ti: Switch clk-provider.h include to clk.h
  clk: pistachio: Include clk.h
  clk: ingenic: Include clk.h
  clk: si570: Include clk.h
  clk: moxart: Include clk.h
  clk: cdce925: Include clk.h
  clk: Include clk.h in clk.c
  clk: zynq: Include clk.h
  clk: ti: Include clk.h
  clk: sunxi: Include clk.h and remove unused clkdev.h includes
  clk: st: Include clk.h
  clk: qcom: Include clk.h
  clk: highbank: Include clk.h
  clk: bcm: Include clk.h
  clk: versatile: Remove clk.h and clkdev.h includes
  clk: ux500: Remove clk.h and clkdev.h includes
  clk: tegra: Properly include clk.h
  ...

8 years agoclk: ti: make use of of_clk_parent_fill helper function
Dinh Nguyen [Tue, 7 Jul 2015 03:59:06 +0000 (22:59 -0500)]
clk: ti: make use of of_clk_parent_fill helper function

Use of_clk_parent_fill to fill in the parent clock names' array.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: sunxi: make use of of_clk_parent_fill helper function
Dinh Nguyen [Tue, 7 Jul 2015 03:59:05 +0000 (22:59 -0500)]
clk: sunxi: make use of of_clk_parent_fill helper function

Use of_clk_parent_fill to fill in the parent clock names' array.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: "Emilio López" <emilio@elopez.com.ar>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: st: make use of of_clk_parent_fill helper function
Dinh Nguyen [Tue, 7 Jul 2015 03:59:04 +0000 (22:59 -0500)]
clk: st: make use of of_clk_parent_fill helper function

Use of_clk_parent_fill to fill in the parent clock names' array.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Tested-by Gabriel Fernandez <gabriel.fernandez@st.com>
Cc: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: keystone: make use of of_clk_parent_fill helper function
Dinh Nguyen [Tue, 7 Jul 2015 03:59:03 +0000 (22:59 -0500)]
clk: keystone: make use of of_clk_parent_fill helper function

Use of_clk_parent_fill to fill in the parent clock names' array.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: at91: make use of of_clk_parent_fill helper function
Dinh Nguyen [Tue, 7 Jul 2015 03:59:01 +0000 (22:59 -0500)]
clk: at91: make use of of_clk_parent_fill helper function

Use of_clk_parent_fill to fill in the parent clock names' array.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mediatek: Add MT8173 MMPLL change rate support
James Liao [Fri, 10 Jul 2015 08:39:34 +0000 (16:39 +0800)]
clk: mediatek: Add MT8173 MMPLL change rate support

MT8173 MMPLL frequency settings are different from common PLLs.
It needs different post divider settings for some ranges of frequency.
This patch add support for MT8173 MMPLL frequency setting by adding
div-rate table to lookup suitable post divider setting under a
specified frequency.

Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mediatek: Fix calculation of PLL rate settings
James Liao [Fri, 10 Jul 2015 08:39:33 +0000 (16:39 +0800)]
clk: mediatek: Fix calculation of PLL rate settings

Avoid u32 overflow when calculate post divider setting, and
increase the max post divider setting from 3 (/8) to 4 (/16).

Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mediatek: Fix PLL registers setting flow
James Liao [Fri, 10 Jul 2015 08:39:32 +0000 (16:39 +0800)]
clk: mediatek: Fix PLL registers setting flow

Write postdiv and pcw settings at the same time for PLLs if postdiv
and pcw settings are on the same register.

This is need by PLLs such as MT8173 MMPLL and ARM*PLL.

Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: Allow providers to configure min/max rates
Stephen Boyd [Thu, 16 Jul 2015 19:50:27 +0000 (12:50 -0700)]
clk: Allow providers to configure min/max rates

clk providers are using the consumer APIs to set min/max rates on
the clock they're providing. To encourage clk providers to move
away from the consumer APIs, add a provider API to set the
min/max rate of a clock. The assumption is that this is done
before the clock can be requested via clk_get() and that the
clock rate is already within the boundaries of the min/max that's
configured.

Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: twl6040: Convert to use devm_clk_register
Axel Lin [Thu, 16 Jul 2015 14:15:53 +0000 (22:15 +0800)]
clk: twl6040: Convert to use devm_clk_register

Use devm_clk_register() to simplify the code by removing
twl6040_clk_remove().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: s2mps11: Simplify s2mps11_clk_probe unwind paths
Axel Lin [Thu, 16 Jul 2015 13:59:43 +0000 (21:59 +0800)]
clk: s2mps11: Simplify s2mps11_clk_probe unwind paths

The devm_clk_unregister() in .probe error case is not necessary as it will
be automatically called when probe fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: shmobile: Remove unneeded #include <linux/clkdev.h>
Geert Uytterhoeven [Tue, 23 Jun 2015 13:09:27 +0000 (15:09 +0200)]
clk: shmobile: Remove unneeded #include <linux/clkdev.h>

The CCF implementations for the various shmobile SoCs don't use clkdev
functionality, hence drop the inclusion of <linux/clkdev.h>.

Add the missing #include <linux/slab.h>, which was included implicitly
through <asm/clkdev.h> before.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: Force pointer to be __iomem
Stephen Boyd [Wed, 15 Jul 2015 19:58:22 +0000 (12:58 -0700)]
clk: ti: Force pointer to be __iomem

Add __force here so that sparse doesn't complain about us playing
tricks with __iomem.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: clk-3xxx: Remove unused structures
Stephen Boyd [Wed, 15 Jul 2015 19:04:53 +0000 (12:04 -0700)]
clk: ti: clk-3xxx: Remove unused structures

Sparse complains about these structures missing static, but they
also don't look to be used. Remove them.

drivers/clk/ti/clk-3xxx.c:74:30: warning: symbol 'clkhwops_omap3430es2_ssi_wait' was not declared. Should it be static?
drivers/clk/ti/clk-3xxx.c:157:30: warning: symbol 'clkhwops_omap3430es2_hsotgusb_wait' was not declared. Should it be static?

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: Mark ti_clk_features static
Stephen Boyd [Wed, 15 Jul 2015 19:03:52 +0000 (12:03 -0700)]
clk: ti: Mark ti_clk_features static

This variable isn't exported outside of this file so mark it
static. Silences the following sparse warning:

drivers/clk/ti/clk.c:36:24: warning: symbol 'ti_clk_features' was not declared. Should it be static?

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: Check kzalloc() for failures
Stephen Boyd [Wed, 15 Jul 2015 18:55:42 +0000 (11:55 -0700)]
clk: ti: Check kzalloc() for failures

smatch reports a failure to check kzalloc() here:

drivers/clk/ti/clk.c:232
omap2_clk_provider_init() error: potential null dereference 'io'.
(kzalloc returns null)

Check for an allocation failure and return -ENOMEM.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMerge branch 'for-4.2/ti-clk-move' of https://github.com/t-kristo/linux-pm into clk...
Stephen Boyd [Tue, 28 Jul 2015 18:58:26 +0000 (11:58 -0700)]
Merge branch 'for-4.2/ti-clk-move' of https://github.com/t-kristo/linux-pm into clk-next

From Tero Kristo:
  "This pull request contains the TI clock driver set to move the
   clock implementations under clock driver. Some small portions of
   the clock driver code still remain under mach-omap2 after this,
   it should be decided whether this code is now obsolete and should
   be deleted or should someone try to fix it."

Slight merge conflicts with determine_rate prototype changes.

8 years agoclk: h8300: Fix signness bug
Axel Lin [Sat, 20 Jun 2015 07:27:03 +0000 (15:27 +0800)]
clk: h8300: Fix signness bug

of_clk_get_parent_count() may return negative error code, so num_parents
needs to be int rather than unsigned int.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Set CLK_SET_RATE_PARENT on ce1 clocks
Stephen Boyd [Tue, 14 Jul 2015 23:57:29 +0000 (16:57 -0700)]
clk: qcom: Set CLK_SET_RATE_PARENT on ce1 clocks

The other ce clocks have the flag set, but ce1 doesn't, so
clk_set_rate() doesn't propagate up the tree to the ce1_src_clk.
Set the flag as this is supported.

Reported-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Tested-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Fixes: 02824653200b ("clk: qcom: Add APQ8084 Global Clock Controller support")
Fixes: d33faa9ead8d ("clk: qcom: Add support for MSM8974's global clock controller (GCC)")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: gpio: Unlock mutex on error path
Stephen Boyd [Tue, 14 Jul 2015 19:45:19 +0000 (12:45 -0700)]
clk: gpio: Unlock mutex on error path

We don't unlock the mutex if we fail to allocate the parent names
array. Unlock it and return an error in this case as well.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Cc: Sergej Sawazki <ce3a@gmx.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: h8300: Use standard Linux I/O accessors
Stephen Boyd [Tue, 14 Jul 2015 00:06:53 +0000 (17:06 -0700)]
clk: h8300: Use standard Linux I/O accessors

There doesn't seem to be any reason why we can't use the standard
readb()/writeb() accessors here because ctrl_inb() and
ctrl_outb() match the generic implementation of readb() and
writeb() that the h8300 architecture uses. This allows us to test
compile this driver on other architectures besides h8300.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: h8300: Drop allocation printk and cleanup sizeof style
Stephen Boyd [Mon, 13 Jul 2015 23:54:04 +0000 (16:54 -0700)]
clk: h8300: Drop allocation printk and cleanup sizeof style

We don't need to print an error on allocation failures, drop it.
While we're here, change the sizeof() to be sizeof(*<ptr>) to
make code more future proof.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMerge branch 'clk-determine-rate-struct' into clk-next
Stephen Boyd [Tue, 28 Jul 2015 18:51:30 +0000 (11:51 -0700)]
Merge branch 'clk-determine-rate-struct' into clk-next

* clk-determine-rate-struct:
  clk: fix some determine_rate implementations
  clk: change clk_ops' ->determine_rate() prototype

8 years agoclk: fix some determine_rate implementations
Boris Brezillon [Thu, 9 Jul 2015 20:39:38 +0000 (22:39 +0200)]
clk: fix some determine_rate implementations

Some determine_rate implementations are not returning an error
when they failed to adapt the rate according to the rate request.
Fix them so that they return an error instead of silently
returning 0.

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>
Cc: 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
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: change clk_ops' ->determine_rate() prototype
Boris Brezillon [Tue, 7 Jul 2015 18:48:08 +0000 (20:48 +0200)]
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>
8 years agoclk: Remove clk.h from clk-provider.h
Stephen Boyd [Tue, 23 Jun 2015 00:13:49 +0000 (17:13 -0700)]
clk: Remove clk.h from clk-provider.h

Remove clk.h from clk-provider.h so that we can clearly split clk
providers from clk consumers. This will allow us to quickly
detect when clock providers are using the consumer APIs by
looking at the includes.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: h8300: Remove clk.h and clkdev.h includes
Stephen Boyd [Mon, 13 Jul 2015 23:47:44 +0000 (16:47 -0700)]
clk: h8300: Remove clk.h and clkdev.h includes

Neither of these includes are used in these files, remove them.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: at91: Include clk.h and slab.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: at91: Include clk.h and slab.h

This clock provider uses the consumer API, so include clk.h
explicitly. Also include slab.h instead of relying on clkdev.h
for it.

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: Switch clk-provider.h include to clk.h
Stephen Boyd [Thu, 9 Jul 2015 22:24:51 +0000 (15:24 -0700)]
clk: ti: Switch clk-provider.h include to clk.h

This file isn't a clock provider but uses the consumer API, so
include clk.h instead of clk-provider.h.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: pistachio: Include clk.h
Stephen Boyd [Thu, 9 Jul 2015 22:24:51 +0000 (15:24 -0700)]
clk: pistachio: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ingenic: Include clk.h
Stephen Boyd [Fri, 1 May 2015 23:09:33 +0000 (16:09 -0700)]
clk: ingenic: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Paul Cercueil <paul@crapouillou.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: si570: Include clk.h
Stephen Boyd [Fri, 1 May 2015 23:09:33 +0000 (16:09 -0700)]
clk: si570: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Guenter Roeck <linux@roeck-us.net>
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: moxart: Include clk.h
Stephen Boyd [Fri, 1 May 2015 23:09:33 +0000 (16:09 -0700)]
clk: moxart: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Jonas Jensen <jonas.jensen@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: cdce925: Include clk.h
Stephen Boyd [Wed, 10 Jun 2015 21:14:28 +0000 (14:14 -0700)]
clk: cdce925: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: Include clk.h in clk.c
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: Include clk.h in clk.c

This file implements the clk API and so it should include clk.h
directly instead of indirectly including it through
clk-provider.h.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: zynq: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: zynq: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: ti: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: sunxi: Include clk.h and remove unused clkdev.h includes
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: sunxi: Include clk.h and remove unused clkdev.h includes

This clock provider uses the consumer API, so include clk.h
explicitly. Also remove clkdev.h in files that aren't using it
and include slab.h when clkdev.h was being used to implicitly
include it.

Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: st: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: st: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Gabriel Fernandez <gabriel.fernandez@st.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: qcom: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: highbank: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: highbank: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: bcm: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: bcm: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Acked-by: Alex Elder <elder@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: versatile: Remove clk.h and clkdev.h includes
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: versatile: Remove clk.h and clkdev.h includes

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also remove clkdev.h in files that aren't using
it and replace them with slab.h in files that were relying on the
implicit include of slab.h in clkdev.h.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ux500: Remove clk.h and clkdev.h includes
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: ux500: Remove clk.h and clkdev.h includes

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also remove clkdev.h in files that aren't using
it.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: tegra: Properly include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: tegra: Properly include clk.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include clk.h in files that are using
it. Also add in a clkdev.h include that was missing in a file
using clkdev APIs.

Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: spear: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: spear: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: socfpga: Remove clk.h and clkdev.h includes
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: socfpga: Remove clk.h and clkdev.h includes

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. The clkdev.h include isn't used either, remove
it and add in slab.h to make sure things keep compiling.

Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: sirf: Properly include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: sirf: Properly include clk.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Move the include of clk.h into
clk-common.c because that's the only file that's really using
clk.h, even if it's included into the atlas6 and prima2 files.

Cc: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: samsung: Properly include clk.h and clkdev.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: samsung: Properly include clk.h and clkdev.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include clk.h in files that are
using it. The clkdev.h header isn't always used either, so remove
it and add in slab.h where files were relying on it to include
slab for them.

Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: rockchip: Properly include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: rockchip: Properly include clk.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include clk.h if it's actually used.

Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: nxp: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: nxp: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Acked-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mxs: Include clk.h in C files that use it
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: mxs: Include clk.h in C files that use it

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. The clk.h include is being included in all
mxs files because it's part of mxs/clk.h even though nothing
actually requires it in that file. Move the clk.h include to the
C files that are actually using it and remove the clk.h include
from the header file. The clkdev.h include isn't used either, so
drop it too.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mvebu: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: mvebu: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include the header if necessary. The
clkdev.h include isn't used here either, so drop it and add in
slab.h to keep things compiling.

Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mmp: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: mmp: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. The clkdev.h include isn't used either, so drop
it and add in slab.h to keep things compiling.

Cc: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: meson8b: Properly include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: meson8b: Properly include clk.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include clk.h if it's actually used.

Cc: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mediatek: Properly include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: mediatek: Properly include clk.h

We don't need to include clk.h in header files, just forward
declare struct clk here. This leads us to a few places where the
include of clk.h was missing in C files. Add them.

Cc: James Liao <jamesjj.liao@mediatek.com>
Cc: Henry Chen <henryc.chen@mediatek.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: keystone: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: keystone: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Cc: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: hisilicon: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: hisilicon: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also drop the clkdev.h include in files that
aren't using it.

Cc: Bintian Wang <bintian.wang@huawei.com>
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: wm831x: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: wm831x: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: u300: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: u300: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also add in slab.h because without clkdev.h
compilation of this file would fail.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: twl6040: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: twl6040: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: si5351: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: si5351: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: rk808: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: rk808: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: palmas: Remove clkdev.h includes
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: palmas: Remove clkdev.h includes

This driver includes clkdev.h even though it isn't used, so drop
it.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: nomadik: Remove clk.h and clkdev.h includes
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: nomadik: Remove clk.h and clkdev.h includes

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. This driver also includes clkdev.h even though
it isn't used, so drop it too and add slab.h to make sure
everything still compiles.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mux: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: mux: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: efm32gg: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: efm32gg: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: clps711x: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: clps711x: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: cdce706: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: cdce706: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: axi-clkgen: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 21:59:11 +0000 (14:59 -0700)]
clk: axi-clkgen: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: i.MX: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clk: i.MX: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agolib/vsprintf.c: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
lib/vsprintf.c: Include clk.h

This file uses the clk API so it should include clk.h directly
instead of indirectly including it through clk-provider.h.

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agosimplefb: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
simplefb: Include clk.h

This driver uses the consumer API, so include clk.h explicitly
instead of impliclty through the provider API.

Cc: Luc Verhaegen <libv@skynet.be>
Cc: Hans de Goede <hdegoede@redhat.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoACPI: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
ACPI: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the includes here because these are
a provider drivers.

Cc: Ken Xue <Ken.Xue@amd.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclocksource: cadence_ttc: Remove clk-provider.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
clocksource: cadence_ttc: Remove clk-provider.h include

This file doesn't use the clk provider APIs. Remove the include.

Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agospi: spi-pxa2xx: Remove clk.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
spi: spi-pxa2xx: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agostaging: clocking-wizard: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
staging: clocking-wizard: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agopowerpc/512x: clk: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
powerpc/512x: clk: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Gerhard Sittig <gsi@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMIPS: Alchemy: Include clk.h
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
MIPS: Alchemy: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Manuel Lauss <manuel.lauss@gmail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Linux-MIPS <linux-mips@linux-mips.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoarm64: Remove clk-provider.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
arm64: Remove clk-provider.h include

This file doesn't use the clk provider APIs. Remove the include.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoARM: OMAP2+: Include clk.h
Stephen Boyd [Tue, 23 Jun 2015 00:05:21 +0000 (17:05 -0700)]
ARM: OMAP2+: Include clk.h

These files use the consumer API, so include clk.h explicitly.

Acked-by: Tero Kristo <t-kristo@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoARM: s3c64xx: Remove clk-provider.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
ARM: s3c64xx: Remove clk-provider.h include

This file doesn't use the clk provider APIs. Remove the include.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoARM: orion5x: Remove clk-provider.h include
Stephen Boyd [Fri, 19 Jun 2015 22:00:46 +0000 (15:00 -0700)]
ARM: orion5x: Remove clk-provider.h include

This file doesn't use the clk provider APIs. Remove the include.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoARM: mvebu: Remove clk-provider.h include
Stephen Boyd [Tue, 23 Jun 2015 23:08:06 +0000 (16:08 -0700)]
ARM: mvebu: Remove clk-provider.h include

This file doesn't use the clk provider APIs. Remove the include.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoARM: keystone: Remove clk-provider.h include
Stephen Boyd [Tue, 23 Jun 2015 23:08:06 +0000 (16:08 -0700)]
ARM: keystone: Remove clk-provider.h include

This file doesn't use the clk provider APIs. Remove the include.

Cc: Nishanth Menon <nm@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoARM: hisi: Remove clk-provider.h include
Stephen Boyd [Tue, 23 Jun 2015 23:08:06 +0000 (16:08 -0700)]
ARM: hisi: Remove clk-provider.h include

This file doesn't use the clk provider APIs. Remove the include.

Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoARM: at91: Remove clk-provider.h include
Stephen Boyd [Tue, 23 Jun 2015 23:08:06 +0000 (16:08 -0700)]
ARM: at91: Remove clk-provider.h include

This file doesn't use the clk provider APIs. Remove the include.

Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: st: Fix error paths and allocation style
Stephen Boyd [Wed, 8 Jul 2015 01:30:05 +0000 (18:30 -0700)]
clk: st: Fix error paths and allocation style

The error paths in this file leak memory and mappings and test
for pointers being valid after dereferencing them. Fix these
problems and properly free resources on errors. Fix some
stylistic things too like using sizeof(*ptr) and fitting more
code on a single line. Note that we don't unregister clocks here.
That needs a clk_composite_unregister() API that we don't have
right now.

Acked-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
Cc: Pankaj Dev <pankaj.dev@st.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMerge branch 'clk-fixes' into clk-next
Stephen Boyd [Wed, 8 Jul 2015 00:10:50 +0000 (17:10 -0700)]
Merge branch 'clk-fixes' into clk-next

* clk-fixes:
  drivers: clk: st: Incorrect register offset used for lock_status

8 years agoclk: Move clk_provider_list to scope of function using it
Stephen Boyd [Mon, 6 Jul 2015 23:50:00 +0000 (16:50 -0700)]
clk: Move clk_provider_list to scope of function using it

The list isn't used after of_clk_init() is called, so we don't
need to keep an empty list around after init. Put the list on the
stack.

Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: Check for allocation errors in of_clk_init()
Stephen Boyd [Mon, 6 Jul 2015 23:48:19 +0000 (16:48 -0700)]
clk: Check for allocation errors in of_clk_init()

Dan Carpenter reports that we don't check the allocation here for
failure. Add a failure check and free any previously allocated
providers from the clk_provider_list.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMerge branch 'clk-rk3368' into clk-next
Stephen Boyd [Mon, 6 Jul 2015 22:59:33 +0000 (15:59 -0700)]
Merge branch 'clk-rk3368' into clk-next

* clk-rk3368:
  clk: rockchip: add rk3368 clock controller
  clk: rockchip: add missing include guards
  clk: rockchip: add dt-binding header for rk3368
  dt-bindings: add documentation of rk3668 clock controller
  clk: rockchip: define the inverters of rk3066/rk3188 and rk3288
  clk: rockchip: fix issues in the mmc-phase clock
  clk: rockchip: add support for phase inverters
  clk: rockchip: add COMPOSITE_NOGATE_DIVTBL variant
  clk: rockchip: protect register macros against multipart values
  clk: rockchip: fix faulty vip parent name on rk3288
  clk: rockchip: rk3288: add CLK_SET_RATE_PARENT to sclk_mac

8 years agoclk: qcom: Add support for SR2 PLLs
Georgi Djakov [Fri, 12 Jun 2015 08:41:55 +0000 (11:41 +0300)]
clk: qcom: Add support for SR2 PLLs

Add support for SR2 type pll operations. SR2 is optimized for Time Interval
Error (TIE) or absolute jitter.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: at91: Silence warnings and cleanup __init/extern usage
Stephen Boyd [Mon, 6 Jul 2015 19:10:51 +0000 (12:10 -0700)]
clk: at91: Silence warnings and cleanup __init/extern usage

Remove useless ifdefs around function prototypes to silence the
following sparse warnings when the configs aren't enabled.

drivers/clk/at91/clk-h32mx.c:95:13: warning: symbol
'of_sama5d4_clk_h32mx_setup' was not declared. Should it be
static?
drivers/clk/at91/clk-utmi.c:159:13: warning: symbol
'of_at91sam9x5_clk_utmi_setup' was not declared. Should it be
static?

Plus, using __init and extern in function prototypes doesn't do
anything, so just drop it throughout this file.

Acked-by: Boris BREZILLON <boris.brezillon@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agodrivers: clk: st: Incorrect register offset used for lock_status
Pankaj Dev [Tue, 7 Jul 2015 07:40:50 +0000 (09:40 +0200)]
drivers: clk: st: Incorrect register offset used for lock_status

Incorrect register offset used for sthi407 clockgenC

Signed-off-by: Pankaj Dev <pankaj.dev@st.com>
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
Fixes: 51306d56ba81 ("clk: st: STiH407: Support for clockgenC0")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Constify the parent names arrays
Georgi Djakov [Mon, 6 Jul 2015 13:51:30 +0000 (16:51 +0300)]
clk: qcom: Constify the parent names arrays

Make const both the array and the strings, so they can be
moved to .rodata section.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: xgene: Delete duplicated name field
Matthias Brugger [Wed, 17 Jun 2015 21:28:49 +0000 (23:28 +0200)]
clk: xgene: Delete duplicated name field

X-Gene clocks implement it's name in the clock private struct.
This is a duplication of the name field. We can delete the field
and rely on the common implementation to retrieve the name.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>