]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
8 years agoMerge branch 'clk-hw-register' (early part) into clk-next
Stephen Boyd [Thu, 21 Apr 2016 21:47:18 +0000 (14:47 -0700)]
Merge branch 'clk-hw-register' (early part) into clk-next

* 'clk-hw-register' (early part):
  clk: fixed-rate: Add hw based registration APIs
  clk: gpio: Add hw based registration APIs
  clk: composite: Add hw based registration APIs
  clk: fractional-divider: Add hw based registration APIs
  clk: fixed-factor: Add hw based registration APIs
  clk: mux: Add hw based registration APIs
  clk: gate: Add hw based registration APIs
  clk: divider: Add hw based registration APIs
  clkdev: Add clk_hw based registration APIs
  clk: Add clk_hw OF clk providers
  clk: Add {devm_}clk_hw_{register,unregister}() APIs
  clkdev: Remove clk_register_clkdevs()

8 years agoMerge branch 'clk-composite-unregister' into clk-next
Stephen Boyd [Thu, 21 Apr 2016 21:43:56 +0000 (14:43 -0700)]
Merge branch 'clk-composite-unregister' into clk-next

* clk-composite-unregister:
  clk: composite: Add unregister function

8 years agoclk: composite: Add unregister function
Maxime Ripard [Wed, 23 Mar 2016 16:38:24 +0000 (17:38 +0100)]
clk: composite: Add unregister function

The composite clock didn't have any unregistration function, which forced
us to use clk_unregister directly on it.

While it was already not great from an API point of view, it also meant
that we were leaking the clk_composite structure allocated in
clk_register_composite.

Add a clk_unregister_composite function to fix this.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agodt-bindings: Add Oxford Semiconductor OXNAS Standard Clocks bindings
Neil Armstrong [Mon, 18 Apr 2016 10:01:36 +0000 (12:01 +0200)]
dt-bindings: Add Oxford Semiconductor OXNAS Standard Clocks bindings

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: Add Oxford Semiconductor OXNAS Standard Clocks
Neil Armstrong [Mon, 18 Apr 2016 10:01:35 +0000 (12:01 +0200)]
clk: Add Oxford Semiconductor OXNAS Standard Clocks

Add Oxford Semiconductor OXNAS SoC Family Standard Clocks support.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
[sboyd@codeaurora.org: Drop NULL/continue check in registration
loop]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMerge tag 'clk-renesas-for-v4.7-tag2' of git://git.kernel.org/pub/scm/linux/kernel...
Stephen Boyd [Wed, 20 Apr 2016 18:44:03 +0000 (11:44 -0700)]
Merge tag 'clk-renesas-for-v4.7-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next

clk: renesas: R-Car SYSC PM Domain Preparation

  - Export the CPG/MSSR and CPG/MSTP attach/detach_dev callbacks, so
    they can be called by the R-Car SYSC PM Domain driver.

* tag 'clk-renesas-for-v4.7-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers:
  clk: renesas: cpg-mssr: Export cpg_mssr_{at,de}tach_dev()
  clk: renesas: mstp: Provide dummy attach/detach_dev callbacks
  clk: renesas: Provide Kconfig symbols for CPG/MSSR and CPG/MSTP support

8 years agoMerge tag 'v4.7-rockchip-clk2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind...
Stephen Boyd [Wed, 20 Apr 2016 18:41:37 +0000 (11:41 -0700)]
Merge tag 'v4.7-rockchip-clk2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next

Pull some checkpatch silencers from Heiko Stuebner:

Fix quite some checkpatch warnings in the newly added
rk3399 header and also in the clock code itself.

* tag 'v4.7-rockchip-clk2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  clk: rockchip: fix checkpatch warning in core code
  clk: rockchip: drop unnecessary header comment
  clk: rockchip: reign in some overly long lines in the rk3399 controller
  clk: rockchip: fix checkpatch errors in rk3399 dt-binding header

8 years agoclk: rockchip: fix checkpatch warning in core code
Heiko Stuebner [Tue, 19 Apr 2016 19:29:27 +0000 (21:29 +0200)]
clk: rockchip: fix checkpatch warning in core code

We seem to have accumulated a bunch of checkpatch warnings, with mainly
overlong lines and two unnecessary allocation error messages.
Most were introduced with the recent multi-controller-support but some
were quite a bit older.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoclk: renesas: cpg-mssr: Export cpg_mssr_{at,de}tach_dev()
Geert Uytterhoeven [Fri, 4 Mar 2016 16:03:46 +0000 (17:03 +0100)]
clk: renesas: cpg-mssr: Export cpg_mssr_{at,de}tach_dev()

The R-Car SYSC PM Domain driver has to power manage devices in power
areas using clocks. To reuse code and to share knowledge of clocks
suitable for power management, this is ideally done through the existing
cpg_mssr_attach_dev() and cpg_mssr_detach_dev() callbacks.

Hence these callbacks can no longer rely on their "domain" parameter
pointing to the CPG/MSSR Clock Domain. To handle this, keep a pointer to
the clock domain in a static variable. cpg_mssr_attach_dev() has to
support probe deferral, as the R-Car SYSC PM Domain may be initialized,
and devices may be added to it, before the CPG/MSSR Clock Domain is
initialized.

Dummy callbacks are provided for the case where CPG/MSTP support is not
included, so the rcar-sysc driver won't have to care about this.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoclk: renesas: mstp: Provide dummy attach/detach_dev callbacks
Geert Uytterhoeven [Wed, 13 Apr 2016 09:18:06 +0000 (11:18 +0200)]
clk: renesas: mstp: Provide dummy attach/detach_dev callbacks

Provide dummy cpg_mstp_{at,de}tach_dev() PM Domain callbacks if CPG/MSTP
support is not included, so the rcar-sysc driver won't have to care
about this.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoclk: renesas: Provide Kconfig symbols for CPG/MSSR and CPG/MSTP support
Geert Uytterhoeven [Wed, 13 Apr 2016 09:08:42 +0000 (11:08 +0200)]
clk: renesas: Provide Kconfig symbols for CPG/MSSR and CPG/MSTP support

Currently the decision whether to build the renesas-cpg-mssr and
clk-mstp drivers is handled by Makefile logic.  However, the rcar-sysc
driver will need to know whether CPG/MSSR and/or CPG/MSTP support are
available or not.

To avoid having to duplicate this logic, move it to Kconfig. Provide
non-visible CLK_RENESAS_CPG_MSSR and CLK_RENESAS_CPG_MSTP Kconfig
symbols, which can be used by both Makefiles and C code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoclk: bcm2835: Fix PLL poweron
Eric Anholt [Wed, 13 Apr 2016 20:05:03 +0000 (13:05 -0700)]
clk: bcm2835: Fix PLL poweron

In poweroff, we set the reset bit and the power down bit, but only
managed to unset the reset bit for poweron.  This meant that if HDMI
did -EPROBE_DEFER after it had grabbed its clocks, we'd power down the
PLLH (that had been on at boot time) and never recover.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 41691b8862e2 ("clk: bcm2835: Add support for programming the audio domain clocks")
Cc: stable@vger.kernel.org
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: bcm2835: Fix compiler warnings on 64-bit builds
Eric Anholt [Wed, 13 Apr 2016 20:05:02 +0000 (13:05 -0700)]
clk: bcm2835: Fix compiler warnings on 64-bit builds

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qoriq: add __init attribute
Julia Lawall [Mon, 18 Apr 2016 14:55:34 +0000 (16:55 +0200)]
clk: qoriq: add __init attribute

Add __init attribute on a function that is only called from other __init
functions and that is not inlined, at least with gcc version 4.8.4 on an
x86 machine with allyesconfig.  Currently, the function is put in the
.text.unlikely segment.  Declaring it as __init will cause it to be put in
the .init.text and to disappear after initialization.

The result of objdump -x on the function before the change is as follows:

0000000000000000 l     F .text.unlikely 0000000000000071 sysclk_from_fixed.constprop.5

And after the change it is as follows:

0000000000000480 l     F .init.text 000000000000006c sysclk_from_fixed.constprop.5

Done with the help of Coccinelle.  The semantic patch checks for local
static non-init functions that are called from an __init function and are
not called from any other function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: dra7-atl-clock: Fix of_node reference counting
Peter Ujfalusi [Fri, 11 Mar 2016 14:13:32 +0000 (16:13 +0200)]
clk: ti: dra7-atl-clock: Fix of_node reference counting

of_find_node_by_name() will call of_node_put() on the node so we need to
get it first to avoid warnings.
The cfg_node needs to be put after we have finished processing the
properties.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: fixed-rate: Add hw based registration APIs
Stephen Boyd [Sun, 7 Feb 2016 08:34:13 +0000 (00:34 -0800)]
clk: fixed-rate: Add hw based registration APIs

Add registration APIs in the clk fixed-rate code to return struct
clk_hw pointers instead of struct clk pointers. This way we hide
the struct clk pointer from providers unless they need to use
consumer facing APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: gpio: Add hw based registration APIs
Stephen Boyd [Sun, 7 Feb 2016 08:27:55 +0000 (00:27 -0800)]
clk: gpio: Add hw based registration APIs

Add registration APIs in the clk gpio code to return struct
clk_hw pointers instead of struct clk pointers. This way we hide
the struct clk pointer from providers unless they need to use
consumer facing APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: composite: Add hw based registration APIs
Stephen Boyd [Sun, 7 Feb 2016 08:20:31 +0000 (00:20 -0800)]
clk: composite: Add hw based registration APIs

Add registration APIs in the clk composite code to return struct
clk_hw pointers instead of struct clk pointers. This way we hide
the struct clk pointer from providers unless they need to use
consumer facing APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: fractional-divider: Add hw based registration APIs
Stephen Boyd [Sun, 7 Feb 2016 08:15:09 +0000 (00:15 -0800)]
clk: fractional-divider: Add hw based registration APIs

Add registration APIs in the clk fractional divider code to
return struct clk_hw pointers instead of struct clk pointers.
This way we hide the struct clk pointer from providers unless
they need to use consumer facing APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: fixed-factor: Add hw based registration APIs
Stephen Boyd [Sun, 7 Feb 2016 08:11:06 +0000 (00:11 -0800)]
clk: fixed-factor: Add hw based registration APIs

Add registration APIs in the clk fixed-factor code to return
struct clk_hw pointers instead of struct clk pointers. This way
we hide the struct clk pointer from providers unless they need to
use consumer facing APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mux: Add hw based registration APIs
Stephen Boyd [Sun, 7 Feb 2016 08:05:48 +0000 (00:05 -0800)]
clk: mux: Add hw based registration APIs

Add registration APIs in the clk mux code to return struct clk_hw
pointers instead of struct clk pointers. This way we hide the
struct clk pointer from providers unless they need to use
consumer facing APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: gate: Add hw based registration APIs
Stephen Boyd [Sun, 7 Feb 2016 07:54:45 +0000 (23:54 -0800)]
clk: gate: Add hw based registration APIs

Add registration APIs in the clk gate code to return struct
clk_hw pointers instead of struct clk pointers. This way we hide
the struct clk pointer from providers unless they need to use
consumer facing APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: divider: Add hw based registration APIs
Stephen Boyd [Sun, 7 Feb 2016 07:26:37 +0000 (23:26 -0800)]
clk: divider: Add hw based registration APIs

Add registration APIs in the clk divider code to return struct
clk_hw pointers instead of struct clk pointers. This way we hide
the struct clk pointer from providers unless they need to use
consumer facing APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclkdev: Add clk_hw based registration APIs
Stephen Boyd [Mon, 8 Feb 2016 22:59:49 +0000 (14:59 -0800)]
clkdev: Add clk_hw based registration APIs

Now that we have a clk registration API that doesn't return
struct clks, we need to have some way to hand out struct clks via
the clk_get() APIs that doesn't involve associating struct clk
pointers with a struct clk_lookup. Luckily, clkdev already
operates on struct clk_hw pointers, except for the registration
facing APIs where it converts struct clk pointers into struct
clk_hw pointers almost immediately.

Let's add clk_hw based registration APIs so that we can skip the
conversion step and provide a way for clk provider drivers to
operate exclusively on clk_hw structs. This way we clearly
split the API between consumers and providers.

Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: Add clk_hw OF clk providers
Stephen Boyd [Sat, 6 Feb 2016 01:38:26 +0000 (17:38 -0800)]
clk: Add clk_hw OF clk providers

Now that we have a clk registration API that doesn't return
struct clks, we need to have some way to hand out struct clks via
the clk_get() APIs that doesn't involve associating struct clk
pointers with an OF node. Currently we ask the OF provider to
give us a struct clk pointer for some clkspec, turn that struct
clk into a struct clk_hw and then allocate a new struct clk to
return to the caller.

Let's add a clk_hw based OF provider hook that returns a struct
clk_hw directly, so that we skip the intermediate step of
converting from struct clk to struct clk_hw. Eventually when
we've converted all OF clk providers to struct clk_hw based APIs
we can remove the struct clk based ones.

It should also be noted that we change the onecell provider to
have a flex array instead of a pointer for the array of clk_hw
pointers. This allows providers to allocate one structure of the
correct length in one step instead of two.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: Add {devm_}clk_hw_{register,unregister}() APIs
Stephen Boyd [Sat, 6 Feb 2016 01:02:52 +0000 (17:02 -0800)]
clk: Add {devm_}clk_hw_{register,unregister}() APIs

We've largely split the clk consumer and provider APIs along
struct clk and struct clk_hw, but clk_register() still returns a
struct clk pointer for each struct clk_hw that's registered.
Eventually we'd like to only allocate struct clks when there's a
user, because struct clk is per-user now, so clk_register() needs
to change.

Let's add new APIs to register struct clk_hws, but this time
we'll hide the struct clk from the caller by returning an int
error code. Also add an unregistration API that takes the clk_hw
structure that was passed to the registration API. This way
provider drivers never have to deal with a struct clk pointer
unless they're using the clk consumer APIs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclkdev: Remove clk_register_clkdevs()
Stephen Boyd [Sat, 6 Feb 2016 00:40:47 +0000 (16:40 -0800)]
clkdev: Remove clk_register_clkdevs()

Now that we've converted the only caller over to another clkdev
API, remove this one.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: rockchip: drop unnecessary header comment
Heiko Stuebner [Tue, 19 Apr 2016 19:17:55 +0000 (21:17 +0200)]
clk: rockchip: drop unnecessary header comment

The internal clk header did contain a comment indicating that some of the
defined registers were shared over multiple clock controller variants.
In recent times, it was simply extended all the time and stopped providing
any meaningful information, so drop it and it's overlong line.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoclk: rockchip: reign in some overly long lines in the rk3399 controller
Heiko Stuebner [Tue, 19 Apr 2016 19:07:01 +0000 (21:07 +0200)]
clk: rockchip: reign in some overly long lines in the rk3399 controller

We allow overlong lines in the array portitions describing the clock
trees to ease readability by having each element always at the same
position. But the rest of the code should honor the 80 char limit.

Fix the newly added rk3399 clock code to respect that.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoMerge branch 'v4.7-shared/clkids' into v4.7-clk/next
Heiko Stuebner [Sat, 16 Apr 2016 01:04:15 +0000 (03:04 +0200)]
Merge branch 'v4.7-shared/clkids' into v4.7-clk/next

8 years agoclk: rockchip: fix checkpatch errors in rk3399 dt-binding header
Heiko Stuebner [Sat, 16 Apr 2016 00:54:52 +0000 (02:54 +0200)]
clk: rockchip: fix checkpatch errors in rk3399 dt-binding header

Some "please, no space before tabs" checkpatch warnings slipped through
the recent addition of the rk3399 dt-binding header, so fix them.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoclk: ti: dra7: fix kernel boot with arg 'clocksource=gp_timer'
Grygorii Strashko [Thu, 10 Dec 2015 17:03:45 +0000 (19:03 +0200)]
clk: ti: dra7: fix kernel boot with arg 'clocksource=gp_timer'

The OMAP Platform code provides possibility to select GP Timer as
default clocksource instead of counter_32K by using bootcmd parameter
'clocksource', but the system will crash during early boot when this
option is used on dra7 or omap5 platforms, because it will hit BUG()
statement:

 omap2_gptimer_clocksource_init
  ->BUG_ON(res);

This happens because clk_dev alias "sys_clkin_ck" is not registered.
Hence, fix it by adding missing "sys_clkin_ck" clk_dev aliases
definitions for omap5 and dra7.

Acked-by: Tero Kristo <t-kristo@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: amx3xx: limit the maximum frequency of DPLLs based on spec
Tero Kristo [Wed, 16 Mar 2016 19:54:56 +0000 (21:54 +0200)]
clk: ti: amx3xx: limit the maximum frequency of DPLLs based on spec

AM33xx/AM43xx devices use the same DPLL IP blocks, which only support
maximum rate of 1GHz [1] for the default and 2GHz for the low-jitter type
DPLLs [2]. Reflect this limitation in the DPLL init code by adding the
max-rate parameter based on the DPLL types.

[1] Functional, integration & test specification for GS70 ADPLLS, Rev 1.0-01
[2] Functional, integration & test specification for GS70 ADPLLLJ, Rev 0.8-02

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: dpll: add support for specifying max rate for DPLLs
Tero Kristo [Wed, 16 Mar 2016 19:54:55 +0000 (21:54 +0200)]
clk: ti: dpll: add support for specifying max rate for DPLLs

DPLLs typically have a maximum rate they can support, and this varies
from DPLL to DPLL. Add support of the maximum rate value to the DPLL
data struct, and also add check for this in the DPLL round_rate function.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: tango4: improve clkgen driver
Marc Gonzalez [Mon, 4 Apr 2016 09:21:09 +0000 (11:21 +0200)]
clk: tango4: improve clkgen driver

Add support for USB and SDIO clocks.
Report unsupported setups and panic.

Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: at91: fix check of clk_register() returned value
Vladimir Zapolskiy [Mon, 7 Mar 2016 23:41:29 +0000 (01:41 +0200)]
clk: at91: fix check of clk_register() returned value

The clk_register() function returns a valid pointer to struct clk or
ERR_PTR() error code, this makes a check for returned NULL value
useless and may lead to oops on error path.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: bcc5fd49a0fd ("clk: at91: add a driver for the h32mx clock")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: xgene: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:26 +0000 (11:00 -0800)]
clk: xgene: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Loc Ho <lho@apm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: wm831x: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:25 +0000 (11:00 -0800)]
clk: wm831x: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: twl6040: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:24 +0000 (11:00 -0800)]
clk: twl6040: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: rk808: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:20 +0000 (11:00 -0800)]
clk: rk808: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qoriq: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:19 +0000 (11:00 -0800)]
clk: qoriq: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Hou Zhiqiang <B48286@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: palmas: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:17 +0000 (11:00 -0800)]
clk: palmas: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: nspire: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:16 +0000 (11:00 -0800)]
clk: nspire: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Daniel Tang <dt.tangr@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ls1x: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:13 +0000 (11:00 -0800)]
clk: ls1x: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Kelvin Cheung <keguang.zhang@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: clps711x: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:10 +0000 (11:00 -0800)]
clk: clps711x: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: zte: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:08 +0000 (11:00 -0800)]
clk: zte: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: sunxi: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 19:00:01 +0000 (11:00 -0800)]
clk: sunxi: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: sirf: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 18:59:59 +0000 (10:59 -0800)]
clk: sirf: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Guo Zeng <Guo.Zeng@csr.com>
Cc: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mmp: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 18:59:52 +0000 (10:59 -0800)]
clk: mmp: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: meson: Remove CLK_IS_ROOT
Stephen Boyd [Tue, 1 Mar 2016 18:59:51 +0000 (10:59 -0800)]
clk: meson: Remove CLK_IS_ROOT

This flag is a no-op now. Remove usage of the flag.

Cc: Carlo Caione <carlo@caione.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMerge branch 'clk-artpec6' into clk-next
Stephen Boyd [Fri, 15 Apr 2016 23:02:46 +0000 (16:02 -0700)]
Merge branch 'clk-artpec6' into clk-next

* clk-artpec6:
  clk: add artpec-6 clock controller
  clk: add device tree binding for Artpec-6 clock controller

8 years agoclk: add artpec-6 clock controller
Lars Persson [Mon, 4 Apr 2016 09:23:23 +0000 (11:23 +0200)]
clk: add artpec-6 clock controller

Add a driver for the main clock controller of the Artpec-6 Soc.

Signed-off-by: Lars Persson <larper@axis.com>
[sboyd@codeaurora.org: Reformatted driver structure and of match]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: add device tree binding for Artpec-6 clock controller
Lars Persson [Mon, 4 Apr 2016 09:23:22 +0000 (11:23 +0200)]
clk: add device tree binding for Artpec-6 clock controller

Add device tree documentation for the main clock controller in the
Artpec-6 SoC.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lars Persson <larper@axis.com>
[sboyd@codeaurora.org: Added unit address to binding example]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: ti: dflt: remove redundant unlikely
Suman Anna [Tue, 5 Apr 2016 18:28:57 +0000 (13:28 -0500)]
clk: ti: dflt: remove redundant unlikely

Commit 7aba4f5201d1 ("clk: ti: dflt: fix enable_reg validity check")
fixed a validation check by using an IS_ERR() macro within the
existing unlikely expression, but IS_ERR() macro already has an
unlikely inside it, so get rid of the redundant unlikely macro
from the validation check.

Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMerge tag 'v4.7-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind...
Stephen Boyd [Fri, 15 Apr 2016 22:47:54 +0000 (15:47 -0700)]
Merge tag 'v4.7-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next

Pull rockchip clk updates from Heiko Stuebner:

This is first big chunk of Rockchip clock-related changes for 4.7.

Main change is probably the added support for the new rk3399 soc
and necessary infrastructure changes surrounding it.

The biggest chunk is probably that clock code is now able to
handle multiple clock providers in one system, as the rk3399
has two of those. A general one and another smaller one in a
separate power domain. The rk3399 also uses another new pll type.
Thankfully it just fits nicely into our current structure.
It also needs some parts like the cpuclk mux parameters to be
a bit more flexible and an new fractional divider subtype without
gate.

Apart from this big change we have some more fixes and removal
of forgotten variables.

* tag 'v4.7-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  clk: rockchip: add clock controller for the RK3399
  dt-bindings: add bindings for rk3399 clock controller
  clk: rockchip: add dt-binding header for rk3399
  clk: rockchip: release io resource when failing to init clk
  clk: rockchip: remove redundant checking of device_node
  clk: rockchip: fix warning reported by kernel-doc
  clk: rockchip: remove mux_core_reg from rockchip_cpuclk_reg_data
  clk: rockchip: add new pll-type for rk3399 and similar socs
  clk: rockchip: Add support for multiple clock providers
  clk: rockchip: allow varying mux parameters for cpuclk pll-sources
  clk: rockchip: add a COMPOSITE_FRACMUX_NOGATE type

8 years agoMerge branch 'clk-renesas-for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel...
Stephen Boyd [Fri, 15 Apr 2016 22:44:42 +0000 (15:44 -0700)]
Merge branch 'clk-renesas-for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next

Pull renesas clk driver updates from Geert Uytterhoeven:

  - Support for the PWM module clock and watchdog related clocks on R-Car H3,
  - Cleanups and clarifications.

* 'clk-renesas-for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers:
  clk: renesas: mstp: Clarify cpg_mstp_{at,de}tach_dev() domain parameter
  clk: renesas: cpg-mssr: Drop check for CONFIG_PM_GENERIC_DOMAINS_OF
  clk: renesas: mstp: Drop check for CONFIG_PM_GENERIC_DOMAINS_OF
  clk: renesas: r8a7795: add RWDT clock
  clk: renesas: r8a7795: add R clk
  clk: renesas: r8a7795: add OSC and RINT clocks
  clk: renesas: cpg-mssr: add generic support for read-only DIV6 clocks
  clk: renesas: r8a7795: make SD clk definition specific for GEN3
  clk: renesas: r8a7795: add PWM clock

8 years agoMerge tag 'imx-clk-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo...
Stephen Boyd [Fri, 15 Apr 2016 22:42:31 +0000 (15:42 -0700)]
Merge tag 'imx-clk-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-next

The i.MX clock update for 4.7:
 - Register SAI clk as shared clocks to support SAI audio on i.MX6SX
 - Add the missing ckil clock for i.MX7
 - Update clk-gate2 and vf610 clock driver to prepare for suspend
   support on VF610
 - Fix DCU clock configurations and add TCON ipg clock to support DRM
   display on VF610

* tag 'imx-clk-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  clk: imx: vf610: fix whitespace in vf610-clock.h
  clk: imx: vf610: add TCON ipg clock
  clk: imx: vf610: fix DCU clock tree
  clk: imx: add ckil clock for i.MX7
  clk: imx: vf610: add suspend/resume support
  clk: imx: vf610: add WKPU unit
  clk: imx: vf610: leave DDR clock on
  clk: imx: clk-gate2: allow custom gate configuration
  clk: imx6sx: Register SAI clocks as shared clocks

8 years agoMerge tag 'clk-v4.7-samsung' of git://linuxtv.org/snawrocki/samsung into clk-next
Stephen Boyd [Fri, 15 Apr 2016 22:19:32 +0000 (15:19 -0700)]
Merge tag 'clk-v4.7-samsung' of git://linuxtv.org/snawrocki/samsung into clk-next

Pull samsung clk updates from Sylwester Nawrocki:

This includes addition of some missing clock tree definitions
(UART, MMC2 clocks) for exynos3250 SoC and exporting of IDs
for exynos543x SoC AMBA AXI bus clocks needed for bus frequency
scaling.

* tag 'clk-v4.7-samsung' of git://linuxtv.org/snawrocki/samsung:
  clk: samsung: exynos542x: Add the clock id for ACLK
  dt-bindings: clock: Add the clock id for ACLK clock of Exynos542x SoC
  clk: samsung: exynos3250: Add MMC2 clock
  clk: samsung: exynos3250: Add UART2 clock
  dt-bindings: Add the clock id of UART2 and MMC2 for Exynos3250

8 years agoclk: Add clk_composite_set_rate_and_parent
Finley Xiao [Tue, 12 Apr 2016 08:43:39 +0000 (16:43 +0800)]
clk: Add clk_composite_set_rate_and_parent

When changing the clock-rate, currently a new parent is set first and a
divider adapted thereafter. This may result in the clock-rate overflowing
its target rate for a short time if the new parent has a higher rate than
the old parent.

While this often doesn't produce negative effects, it can affect components
in a voltage-scaling environment, like the GPU on the rk3399 socs, where
the voltage than simply is to low for the temporarily to high clock rate.

For general clock hirarchies this may need more extensive adaptions to
the common clock-framework, but at least for composite clocks having
both parent and rate settings it is easy to create a short-term solution to
make sure the clock-rate does not overflow the target.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoMerge branch 'for-v4.7/clk/exynos542x' into for-v4.7/clk/next
Sylwester Nawrocki [Fri, 15 Apr 2016 16:57:00 +0000 (18:57 +0200)]
Merge branch 'for-v4.7/clk/exynos542x' into for-v4.7/clk/next

8 years agoclk: samsung: exynos542x: Add the clock id for ACLK
Chanwoo Choi [Fri, 15 Apr 2016 06:32:53 +0000 (15:32 +0900)]
clk: samsung: exynos542x: Add the clock id for ACLK

This patch adds the clock id for ACLK clock which is source clock
of AMBA AXI bus. This clock should be handled in the bus frequency
scaling driver.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
8 years agodt-bindings: clock: Add the clock id for ACLK clock of Exynos542x SoC
Chanwoo Choi [Fri, 15 Apr 2016 06:32:52 +0000 (15:32 +0900)]
dt-bindings: clock: Add the clock id for ACLK clock of Exynos542x SoC

This patch adds the clock id for ACLK clock of Exynos542x SoC.
ACLK clock means the source clock of AMBA AXI bus. This clock
id should be used for Bus frequency scaling.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
8 years agoclk: imx: vf610: fix whitespace in vf610-clock.h
Shawn Guo [Tue, 12 Apr 2016 01:22:49 +0000 (09:22 +0800)]
clk: imx: vf610: fix whitespace in vf610-clock.h

There is whitespace in VF610_CLK_OCOTP line.  Fix it.

Signed-off-by: Shawn Guo <shawnguo@kernel.org>
8 years agoclk: imx: vf610: add TCON ipg clock
Stefan Agner [Tue, 12 Apr 2016 00:59:38 +0000 (08:59 +0800)]
clk: imx: vf610: add TCON ipg clock

Add the ipg (bus) clock for the TCON modules (Timing Controller). This
module is required by the new DCU DRM driver, since the display signals
pass through TCON.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
8 years agoclk: imx: vf610: fix DCU clock tree
Stefan Agner [Tue, 5 Apr 2016 05:28:33 +0000 (22:28 -0700)]
clk: imx: vf610: fix DCU clock tree

Similar to an earlier fix for the SAI clocks, the DCU clock hierarchy
mixes the bus clock with the display controllers pixel clock. Tests
have shown that the gates in CCM_CCGR3/9 registers do not control
the DCU pixel clock, but only the register access clock (bus clock).

Fix this by defining the parent clock of VF610_CLK_DCUx to be the bus
clock (ipg_bus).

Since the clock has not been used far, there are no further changes
needed.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
8 years agoclk: Provide OF helper to mark clocks as CRITICAL
Lee Jones [Thu, 11 Feb 2016 21:19:11 +0000 (13:19 -0800)]
clk: Provide OF helper to mark clocks as CRITICAL

This call matches clocks which have been marked as critical in DT
and sets the appropriate flag.  These flags can then be used to
mark the clock core flags appropriately prior to registration.

Legacy bindings requiring this feature must add the clock-critical
property to their binding descriptions, as it is not a part of
common-clock binding.

Cc: devicetree@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/1455225554-13267-4-git-send-email-mturquette@baylibre.com

8 years agoclk: WARN_ON about to disable a critical clock
Lee Jones [Thu, 11 Feb 2016 21:19:10 +0000 (13:19 -0800)]
clk: WARN_ON about to disable a critical clock

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/1455225554-13267-3-git-send-email-mturquette@baylibre.com

8 years agoclk: Allow clocks to be marked as CRITICAL
Lee Jones [Thu, 11 Feb 2016 21:19:09 +0000 (13:19 -0800)]
clk: Allow clocks to be marked as CRITICAL

Critical clocks are those which must not be gated, else undefined
or catastrophic failure would occur.  Here we have chosen to
ensure the prepare/enable counts are correctly incremented, so as
not to confuse users with enabled clocks with no visible users.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/1455225554-13267-2-git-send-email-mturquette@baylibre.com

8 years agoclk: renesas: mstp: Clarify cpg_mstp_{at,de}tach_dev() domain parameter
Geert Uytterhoeven [Fri, 4 Mar 2016 15:59:26 +0000 (16:59 +0100)]
clk: renesas: mstp: Clarify cpg_mstp_{at,de}tach_dev() domain parameter

Make it clear that the "domain" parameter of the cpg_mstp_attach_dev()
and cpg_mstp_detach_dev() functions is not used.

The cpg_mstp_attach_dev() and cpg_mstp_detach_dev() callbacks are not
only used by the CPG/MSTP Clock Domain driver, but also by the R-Mobile
SYSC PM Domain driver.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 years agoclk: renesas: cpg-mssr: Drop check for CONFIG_PM_GENERIC_DOMAINS_OF
Geert Uytterhoeven [Fri, 4 Mar 2016 14:36:33 +0000 (15:36 +0100)]
clk: renesas: cpg-mssr: Drop check for CONFIG_PM_GENERIC_DOMAINS_OF

As of commit 71d076ceb245f0d9 ("ARM: shmobile: Enable PM and
PM_GENERIC_DOMAINS for SoCs with PM Domains"),
CONFIG_PM_GENERIC_DOMAINS_OF is always enabled for SoCs with a CPG/MSSR
block.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoclk: renesas: mstp: Drop check for CONFIG_PM_GENERIC_DOMAINS_OF
Geert Uytterhoeven [Fri, 4 Mar 2016 14:32:40 +0000 (15:32 +0100)]
clk: renesas: mstp: Drop check for CONFIG_PM_GENERIC_DOMAINS_OF

As of commit 71d076ceb245f0d9 ("ARM: shmobile: Enable PM and
PM_GENERIC_DOMAINS for SoCs with PM Domains"),
CONFIG_PM_GENERIC_DOMAINS_OF is always enabled for SoCs with MSTP
clocks.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agoclk: imx: add ckil clock for i.MX7
Gary Bisson [Sat, 2 Apr 2016 16:25:45 +0000 (18:25 +0200)]
clk: imx: add ckil clock for i.MX7

Add the necessary clock to use the ckil on i.MX7.

Inspired from the following patch:
https://github.com/boundarydevices/linux-imx6/commit/b80e8271

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
8 years agoclk: renesas: r8a7795: add RWDT clock
Wolfram Sang [Wed, 30 Mar 2016 14:58:21 +0000 (16:58 +0200)]
clk: renesas: r8a7795: add RWDT clock

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 years agoclk: renesas: r8a7795: add R clk
Wolfram Sang [Wed, 30 Mar 2016 14:58:20 +0000 (16:58 +0200)]
clk: renesas: r8a7795: add R clk

R can select between two parents. We deal with it like this: During
initialization, check if EXTALR is populated. If so, use it for R. If
not, use R_Internal. clk_mux doesn't help here because we don't want to
switch parents depending on the clock rate. The clock rate (and source)
should stay constant for the watchdog, so I think a setup like this
during initialization makes sense.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 years agoclk: renesas: r8a7795: add OSC and RINT clocks
Wolfram Sang [Wed, 30 Mar 2016 14:58:19 +0000 (16:58 +0200)]
clk: renesas: r8a7795: add OSC and RINT clocks

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 years agoclk: renesas: cpg-mssr: add generic support for read-only DIV6 clocks
Wolfram Sang [Wed, 30 Mar 2016 14:58:18 +0000 (16:58 +0200)]
clk: renesas: cpg-mssr: add generic support for read-only DIV6 clocks

Gen3 has two clocks (OSC and R) which look like a DIV6 clock but their
divider value is read-only and depends on MD pins at bootup. Add support
for such clocks by reading the value and adding a fixed clock.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 years agodt-bindings: arm: add DT binding for Marvell AP806 system controller
Thomas Petazzoni [Sun, 27 Mar 2016 09:26:14 +0000 (11:26 +0200)]
dt-bindings: arm: add DT binding for Marvell AP806 system controller

This commit adds the Device Tree binding documentation for the system
controller found in Marvell AP806 HW block, which is one of the core
HW blocks of the 64-bits Marvell Armada 7K/8K family.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: unconditionally recurse into clk/mvebu/
Thomas Petazzoni [Sun, 27 Mar 2016 09:26:13 +0000 (11:26 +0200)]
clk: unconditionally recurse into clk/mvebu/

The drivers/clk/mvebu directory is only being built when
CONFIG_PLAT_ORION=y. As we are going to support additional mvebu
platforms in drivers/clk/mvebu, which don't have CONFIG_PLAT_ORION=y,
we need to recurse into this directory regardless of the value of
CONFIG_PLAT_ORION.

Since all files in drivers/clk/mvebu/ are already conditionally
compiled depending on various Kconfig options, we can recurse
unconditionally into drivers/clk/mvebu without any other change.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: samsung: exynos3250: Add MMC2 clock
Chanwoo Choi [Thu, 31 Mar 2016 02:48:00 +0000 (11:48 +0900)]
clk: samsung: exynos3250: Add MMC2 clock

This patch add the MMC2 clocks (mux, divider, gate) of Exynos3250 SoC.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
8 years agoclk: samsung: exynos3250: Add UART2 clock
Pankaj Dubey [Thu, 31 Mar 2016 02:47:59 +0000 (11:47 +0900)]
clk: samsung: exynos3250: Add UART2 clock

This patch add the UART2 clocks (mux, divider, gate) of Exynos3250 SoC.

Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
8 years agodt-bindings: Add the clock id of UART2 and MMC2 for Exynos3250
Chanwoo Choi [Thu, 31 Mar 2016 02:47:58 +0000 (11:47 +0900)]
dt-bindings: Add the clock id of UART2 and MMC2 for Exynos3250

This patch adds the new clock id for both UART2 and MM2 device
for Exynos3250 SoC.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
8 years agoclk: imx: vf610: add suspend/resume support
Stefan Agner [Thu, 10 Mar 2016 02:16:50 +0000 (18:16 -0800)]
clk: imx: vf610: add suspend/resume support

The clock register are lost when enterying LPSTOPx, hence provide
suspend/resume functions restoring them. The clock gates get
restored by the individual driver, hence we do not need to restore
them here.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
8 years agoclk: imx: vf610: add WKPU unit
Stefan Agner [Thu, 10 Mar 2016 02:16:49 +0000 (18:16 -0800)]
clk: imx: vf610: add WKPU unit

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
8 years agoclk: imx: vf610: leave DDR clock on
Stefan Agner [Thu, 10 Mar 2016 02:16:48 +0000 (18:16 -0800)]
clk: imx: vf610: leave DDR clock on

To use STOP mode without putting DDR3 into self-refresh mode, we
need to keep the DDR clock enabled. Use the new gate configuration
with a value of 2 to make sure that the clock is enabled in RUN,
WAIT and STOP mode.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
8 years agoclk: imx: clk-gate2: allow custom gate configuration
Stefan Agner [Thu, 10 Mar 2016 02:16:47 +0000 (18:16 -0800)]
clk: imx: clk-gate2: allow custom gate configuration

The 2-bit gates found i.MX and Vybrid SoC support different clock
configuration:

0b00: clk disabled
0b01: clk enabled in RUN mode but disabled in WAIT and STOP mode
0b10: clk enabled in RUN, WAIT and STOP mode (only Vybrid)
0b11: clk enabled in RUN and WAIT mode

For some clocks, we might want to configure different behaviour,
e.g. a memory clock should be on even in STOP mode. Add a new
function imx_clk_gate2_cgr which allow to configure specific
gate values through the cgr_val parameter.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
8 years agoclk: imx6sx: Register SAI clocks as shared clocks
Fabio Estevam [Tue, 8 Mar 2016 12:33:39 +0000 (09:33 -0300)]
clk: imx6sx: Register SAI clocks as shared clocks

SAIx and SAIx_IPG share the same bit fields in the CCM registers, so
we should better register them via imx_clk_gate2_shared().

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
8 years agoMerge tag 'bcm2835-clk-next-2016-03-17' of git://github.com/anholt/linux into clk...
Stephen Boyd [Tue, 29 Mar 2016 23:37:54 +0000 (16:37 -0700)]
Merge tag 'bcm2835-clk-next-2016-03-17' of git://github.com/anholt/linux into clk-next

This pull request against clk/clk-next brings in fixes for fractional
clocks on 2835, add the PCM clock that used to be driven directly by
the bcm2835-i2s driver (that driver has been broken since this driver
was introduced), and adds many other new clocks.

* tag 'bcm2835-clk-next-2016-03-17' of git://github.com/anholt/linux:
  clk: bcm2835: add missing osc and per clocks
  clk: bcm2835: add missing PLL clock dividers
  clk: bcm2835: enable management of PCM clock
  clk: bcm2835: reorganize bcm2835_clock_array assignment
  clk: bcm2835: remove use of BCM2835_CLOCK_COUNT in driver
  clk: bcm2835: expose raw clock-registers via debugfs
  clk: bcm2835: clean up coding style issues
  clk: bcm2835: correctly enable fractional clock support
  clk: bcm2835: divider value has to be 1 or more
  clk: bcm2835: add locking to pll*_on/off methods
  clk: bcm2835: pll_off should only update CM_PLL_ANARST

8 years agoclk: qcom: ipq4019: add some fixed clocks for ddrppl and fepll
Matthew McClintock [Wed, 23 Mar 2016 22:05:00 +0000 (17:05 -0500)]
clk: qcom: ipq4019: add some fixed clocks for ddrppl and fepll

Drivers for these don't exist yet so we will add them as fixed clocks
so we don't BUG() if we change clocks that reference these clocks.

Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: ipq4019: switch remaining defines to enums
Matthew McClintock [Wed, 23 Mar 2016 22:04:59 +0000 (17:04 -0500)]
clk: qcom: ipq4019: switch remaining defines to enums

When this was added not all the remaining defines were switched over to
use enums, so let's complete that process here

Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: qcom: Make reset_control_ops const
Philipp Zabel [Thu, 25 Feb 2016 09:45:12 +0000 (10:45 +0100)]
clk: qcom: Make reset_control_ops const

The qcom_reset_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: tegra: Make reset_control_ops const
Philipp Zabel [Thu, 25 Feb 2016 09:45:11 +0000 (10:45 +0100)]
clk: tegra: Make reset_control_ops const

The rst_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: sunxi: Make reset_control_ops const
Philipp Zabel [Thu, 25 Feb 2016 09:45:10 +0000 (10:45 +0100)]
clk: sunxi: Make reset_control_ops const

The sunxi_ve_reset_ops, sun9i_mmc_reset_ops, and sunxi_usb_reset_ops
structures are never modified. Make them const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: atlas7: Make reset_control_ops const
Philipp Zabel [Thu, 25 Feb 2016 09:45:09 +0000 (10:45 +0100)]
clk: atlas7: Make reset_control_ops const

The atlas7_rst_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: rockchip: Make reset_control_ops const
Philipp Zabel [Thu, 25 Feb 2016 09:45:08 +0000 (10:45 +0100)]
clk: rockchip: Make reset_control_ops const

The rockchip_softrst_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mmp: Make reset_control_ops const
Philipp Zabel [Thu, 25 Feb 2016 09:45:07 +0000 (10:45 +0100)]
clk: mmp: Make reset_control_ops const

The mmp_clk_reset_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: mediatek: Make reset_control_ops const
Philipp Zabel [Thu, 25 Feb 2016 09:45:06 +0000 (10:45 +0100)]
clk: mediatek: Make reset_control_ops const

The mtk_reset_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
8 years agoclk: renesas: r8a7795: make SD clk definition specific for GEN3
Wolfram Sang [Thu, 24 Mar 2016 12:50:41 +0000 (13:50 +0100)]
clk: renesas: r8a7795: make SD clk definition specific for GEN3

About SD clocks: The clock type is Gen3 specific, the callbacks are all
Gen3 specific; I think the clock definition should also be Gen3 specific
and not in the general header file.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 years agoclk: renesas: r8a7795: add PWM clock
Ulrich Hecht [Wed, 9 Mar 2016 16:56:02 +0000 (17:56 +0100)]
clk: renesas: r8a7795: add PWM clock

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
8 years agoclk: rockchip: add clock controller for the RK3399
Xing Zheng [Mon, 28 Mar 2016 09:51:37 +0000 (17:51 +0800)]
clk: rockchip: add clock controller for the RK3399

Add the clock tree definition for the new RK3399 SoC.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agodt-bindings: add bindings for rk3399 clock controller
Xing Zheng [Mon, 28 Mar 2016 09:51:35 +0000 (17:51 +0800)]
dt-bindings: add bindings for rk3399 clock controller

Add devicetree bindings for Rockchip cru which found on
Rockchip SoCs.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>