Commit Graph

601833 Commits

Author SHA1 Message Date
Dong Aisheng 7ec986efed clk: move clk_disable_unused after clk_core_disable_unprepare function
No function level change, just moving code place.
clk_disable_unused function will need to call clk_core_prepare_enable/
clk_core_disable_unprepare when adding CLK_OPS_PARENT_ENABLE features.
So move it after clk_core_disable_unprepare to avoid adding forward
declared functions later.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-07-01 17:40:20 -07:00
Dong Aisheng a6adc30ba7 clk: introduce clk_core_enable_lock and clk_core_disable_lock functions
This can be useful when clock core wants to enable/disable clocks.
Then we don't have to convert the struct clk_core to struct clk to call
clk_enable/clk_disable which is a bit un-align with exist using.

And after introduce clk_core_{enable|disable}_lock, we can refine
clk_enable and clk_disable a bit.

As well as clk_core_{enable|disable}_lock, we also added
clk_core_{prepare|unprepare}_lock and clk_core_prepare_enable/
clk_core_unprepare_disable for clock core to easily use.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-07-01 17:40:18 -07:00
Stephen Boyd 582e2405b2 Placeholder for the rk3399 watchdog pclk, some newly exported
rk3228 clockids and a small fix for the not yet used spdif to
 displayport clock on the rk3399.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCAAGBQJXdbFVAAoJEPOmecmc0R2B2fEH/1Gm80XZsrXPrr0kZ2cO8Zcg
 qUpOPJgZvEWJdG1EGzU34VAEAZP0y8sth46iypL+TP3UVf6Z9acZF2eeAbEvzdVY
 pM6qb0eNLdrcV+aaKhAScxjEwg5kdLxc/kuwOr9XsZwE4Wqvsbmldw5O8qEU8DAP
 fxdhi854hlanCVmTCfdjEpeRqv9JCejU27KttldqBC/0CwGaQwp0cUcp6Ggpv9pF
 deHR5BGj2cwnPR2JmNsZ9U85kgf9/7jd4PD4UXNRG/ApuwpIb0/1ulr4YquqAcDW
 OpdO6at9QmZItYS6byKNoAPKWoGXjmHYnjlENODQsCXoa6K8HkmDnxBtli6Iczw=
 =6ikd
 -----END PGP SIGNATURE-----

Merge tag 'v4.8-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next

Pull rockchip clk driver updates from Heiko Stuebner:

Placeholder for the rk3399 watchdog pclk, some newly exported
rk3228 clockids and a small fix for the not yet used spdif to
displayport clock on the rk3399.

* tag 'v4.8-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  clk: rockchip: fix incorrect rk3399 spdif-DPTX divider bits
  clk: rockchip: export rk3228 MAC clocks
  clk: rockchip: rename rk3228 sclk_macphy_50m to sclk_mac_extclk
  clk: rockchip: export rk3228 audio clocks
  clk: rockchip: include rk3228 downstream muxes into fractional dividers
  clk: rockchip: fix incorrect rk3228 clock registers
  clk: rockchip: add clock-ids for rk3228 MAC clocks
  clk: rockchip: add clock-ids for rk3228 audio clocks
  clk: rockchip: add a dummy clock for the watchdog pclk on rk3399
2016-07-01 17:30:42 -07:00
Stephen Boyd 345c42964c clk: tegra: Changes for v4.8-rc1
Fixes and enhancements mostly for Tegra210 clocks that allow DSI and
 HDMI to work on Tegra X1. There's also a refactoring, including fixes,
 the USB PLL.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXdn0rAAoJEN0jrNd/PrOhcOAQAIvunWSUKIuYzyOnDfUMqWig
 bZ1tZYg2kgQQojYTFkKqWRim//Lj3BwfYxGz6ZsswqQB2NsciiBF+yK3RUmhabik
 CwBwHmDxtQFAhyQ/saJlwWNpokym02X3zNQ5s8R6NJLlnbKVZy8k0MrpBgg7t6yH
 LHcojKnqBxD5XxKtEojJl5bJbizH4uLxSr6oivFD5eUoiKvFP/oLIYVRBdZ6wXcP
 cumO/e82vIdEkouGWeK/+LPz3G92FKRYtfI6qv6I7Tluv3G1S7JGWQ9sYcYWbxnU
 6Y+QMuXVcAe1yf0LKRDR2vOVTxBq1/YBMJEV403TK1dM0tp1I8AK7UtkURNmI8yx
 xXOSPvG6buhbCI/uUy6U86nTXDnwsqWfEdXGFQXt1xwlUKOtRITrQA09khXj5+Dj
 IrhdDSyKXUO5sMCalT+AxPko+lyvxhOLOXQrJwMB6jg8IZfgksi2opdKcBnhhE8P
 b4WyJnXN2fKB8/y7CW6sqQ69+T5Djj1c3m5uDx1384HkWUdamRLaNWlITof/NvNm
 0O5s6mtzml0/oKckH+ROFIq3TNt4NeOOM9M5K7oekEVd5VDk4YrnqIilK9MRXkBi
 XlmZ1VDhXxlfQWBlFhE8mZ6pDegkgGmijtu8YBBghWyUZDEu3bJyATppX/LjANZV
 ooLDGoSXV+Lv9TEnUh5A
 =MxTG
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-4.8-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-next

Pull tegra clk driver updates from Thierry Reding:

Fixes and enhancements mostly for Tegra210 clocks that allow DSI and
HDMI to work on Tegra X1. There's also a refactoring, including fixes,
the USB PLL.

* tag 'tegra-for-4.8-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  clk: tegra: Initialize UTMI PLL when enabling PLLU
  clk: tegra: Micro-optimize Tegra210 clock setup
  clk: tegra: Make sor_safe the parent of dpaux and dpaux1
  clk: tegra: Mark timer clock as critical
  clk: tegra: Enable sor1 and sor1_src on Tegra210
  clk: tegra: Squash sor1 safe/brick/src into a single mux
  clk: tegra: Disable spread spectrum on pll_d2
  clk: tegra: Fixup post dividers on Tegra210
2016-07-01 17:27:14 -07:00
Maxime Ripard e6cbf9984e clk: fixed-factor: Allow for a few clocks to change the parent rate
The only way for a fixed factor clock to change its rate would be to change
its parent rate.

Since passing blindly CLK_SET_RATE_PARENT might break a lot of platforms
that were relying on the fact that the parent rate wouldn't change,
introduce a compatible-based whitelist that will allow clocks to opt-in
that flag.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-07-01 17:16:59 -07:00
Xing Zheng 3770821fa3 clk: rockchip: fix incorrect rk3399 spdif-DPTX divider bits
The CLKSEL_CON32 bit_0 is controlled for spdif_8ch, not spdif_rec_dptx,
it should be bit_8, let's fix it.

Fixes: 115510053e ("clk: rockchip: add clock controller for the RK3399")
Reported-by: Chris Zhong <zyw@rock-chips.com>
Tested-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2016-07-01 01:50:17 +02:00
Xing Zheng 6e3732a2be clk: rockchip: export rk3228 MAC clocks
This patch exports related MAC clocks for dts reference.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2016-07-01 01:50:11 +02:00
Xing Zheng 09f684226d clk: rockchip: rename rk3228 sclk_macphy_50m to sclk_mac_extclk
The sclk_macphy_50m is confusing, the sclk_mac_extclk describes
a external clock  clearly.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2016-07-01 01:50:06 +02:00
Xing Zheng a45c072bb4 clk: rockchip: export rk3228 audio clocks
This patch exports related i2s/spdif clocks for dts reference.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2016-07-01 01:50:02 +02:00
Heiko Stuebner 9daa46cc64 Merge branch 'v4.8-shared/clkids' into v4.8-clk/next 2016-07-01 01:49:53 +02:00
Xing Zheng cb87df58bc clk: rockchip: include rk3228 downstream muxes into fractional dividers
During the initial conversion to the newly introduced combined fractional
dividers+muxes the rk3228 clocks were left out, so convert them now.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2016-07-01 01:49:31 +02:00
Stephen Boyd 6db8c762c8 The i.MX clock updates for 4.8:
- A few correction and improvements on pllv3 driver around AV pll clock
    rate calculation, parent setting and power bit handling
  - Correct i.MX6UL GPT2 clock names
  - A couple of minor fixes on i.MX7D clock driver on DRAM clocks
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJXcjLGAAoJEFBXWFqHsHzOrusH/30eFdM/+gaC38dCi89e6syi
 kUGW4ptkur5vA6FDppqdPXsOntz/AB8QV9z7RbZc6WgWkNOubpGkvL5Y7UOk3ww+
 bJxlf6+tyCZ/dEdHiGnO6sbCUw7XPnRuDHN3vKOi2pyL1Wrdk/Ylvs+ShKUGRAIA
 Wb2U7eXHeJCznfuy9npY0XhdMLHFWTC2QSTZlIUgZeZawBxdI3XQM/McToYsTDnF
 whDR7fm4KKzZpVji+qJUpYGtYmbWUQrX/8kpV4oLDD7UaabRKp22C5p02YXiYFUj
 YulZ6y6r4+XRNqoOObA7Mf68f9MPJX8BuIY/t7eeJlmGr+tD+3rg5svbCFO274k=
 =tyH4
 -----END PGP SIGNATURE-----

Merge tag 'imx-clk-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-next

Pull i.MX clk driver updates from Shawn Guo:

 - A few correction and improvements on pllv3 driver around AV pll clock
   rate calculation, parent setting and power bit handling
 - Correct i.MX6UL GPT2 clock names
 - A couple of minor fixes on i.MX7D clock driver on DRAM clocks

* tag 'imx-clk-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  clk: imx6ul: fix gpt2 clock names
  clk: imx: refine the powerdown bit of clk-pllv3
  clk: imx: clk-pllv3: fix incorrect handle of enet powerdown bit
  clk: imx: fix pll clock parents
  clk: imx7d: correct dram pll type
  clk: imx7d: correct dram root clk parent select
  clk: imx: correct AV PLL rate formula
2016-06-30 13:16:20 -07:00
Stephen Boyd 37bcfe9aba Merge branch 'clk-hw-unregister-fixed-rate' into clk-next
* clk-hw-unregister-fixed-rate:
  clk: fixed-rate: add clk_hw_unregister_fixed_rate()
2016-06-30 13:07:58 -07:00
Masahiro Yamada 5244563737 clk: fixed-rate: add clk_hw_unregister_fixed_rate()
This will be used to migrate to the clk_hw APIs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 13:07:10 -07:00
Jiancheng Xue 224b3b262c clk: hisilicon: hi3519: add driver remove path and fix some issues
1. Add driver remove path.
2. Fix some issues.
   -Fix the ordering issue about clock provider being published.
   -Add error checking upon registering clocks.

Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:35:20 -07:00
Jiancheng Xue fbf0410ed5 clk: hisilicon: add hisi_clk_unregister_* functions
Add hisi_clk_unregister_* functions.

Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:35:18 -07:00
Jiancheng Xue 5497f668c8 clk: hisilicon: add error processing for hisi_clk_register_* functions
Add error processing for hisi_clk_register_* functions.

Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:35:11 -07:00
Jiancheng Xue 322269163a clk: hisilicon: add hisi_clk_alloc function.
Before, there was an ordering issue that the clock provider
had been published in hisi_clk_init before it could provide
valid clocks to consumers. hisi_clk_alloc is just used to
allocate memory space for struct hisi_clock_data. It makes
it possible to publish the provider after the clocks are ready.

Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:34:19 -07:00
Jiancheng Xue 97b7129cd2 reset: hisilicon: change the definition of hisi_reset_init
Change the input arguments type to struct platform_device pointer.

Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:33:22 -07:00
Stephen Boyd b228fad50c clk: s2mps11: Migrate to clk_hw based OF and registration APIs
Now that we have clk_hw based provider APIs to register clks, we
can get rid of struct clk pointers while registering clks in
these drivers, allowing us to move closer to a clear split of
consumer and provider clk APIs.

Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Acked-by: Andi Shyti <andi.shyti@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:29:14 -07:00
Stephen Boyd 4e950d1ef1 clk: stm32f4: Migrate to clk_hw based OF and registration APIs
Now that we have clk_hw based provider APIs to register clks, we
can get rid of struct clk pointers while registering clks in
these drivers, allowing us to move closer to a clear split of
consumer and provider clk APIs.

Cc: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:28:04 -07:00
Stephen Boyd ff02c6c0a4 clk: bcm: iproc: Migrate to clk_hw based registration and OF APIs
Now that we have clk_hw based provider APIs to register clks, we
can get rid of struct clk pointers while registering clks in
these drivers, allowing us to move closer to a clear split of
consumer and provider clk APIs.

Cc: Jon Mason <jonmason@broadcom.com>
Cc: Simran Rai <ssimran@broadcom.com>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Tested-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:26:45 -07:00
Stephen Boyd fb2cd7d07a clk: u300: Migrate to clk_hw based registration APIs
Now that we have clk_hw based provider APIs to register clks, we
can get rid of struct clk pointers while registering clks in
these drivers, allowing us to move closer to a clear split of
consumer and provider clk APIs.

Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:26:18 -07:00
Stephen Boyd 7b38d1b222 clk: nomadik: Migrate to clk_hw based OF and registration APIs
Now that we have clk_hw based provider APIs to register clks, we
can get rid of struct clk pointers while registering clks in
these drivers, allowing us to move closer to a clear split of
consumer and provider clk APIs.

Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:25:53 -07:00
Stephen Boyd 8e66cc0582 clk: highbank: Migrate to clk_hw based registration and OF APIs
Now that we have clk_hw based provider APIs to register clks, we
can get rid of struct clk pointers in this driver, allowing us to
move closer to a clear split of consumer and provider clk APIs.

Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:25:28 -07:00
Stephen Boyd 1ff435d357 Merge branch 'clk-st-critical' into clk-next
* clk-st-critical:
  clk: st: clkgen-pll: Detect critical clocks
  clk: st: clkgen-fsyn: Detect critical clocks
  clk: st: clk-flexgen: Detect critical clocks
2016-06-30 12:19:22 -07:00
Lee Jones 6ca59e6e1f clk: st: clkgen-pll: Detect critical clocks
Utilise the new Critical Clock infrastructure to mark clocks which
much not be disabled as CRITICAL.

Clocks are marked as CRITICAL using clk flags.  This patch also
ensures flags are peculated through the framework in the correct
manner.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:17:11 -07:00
Lee Jones a3a2d78bd1 clk: st: clkgen-fsyn: Detect critical clocks
Utilise the new Critical Clock infrastructure to mark clocks which
much not be disabled as CRITICAL.

Clocks are marked as CRITICAL using clk flags.  This patch also
ensures flags are peculated through the framework in the correct
manner.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:17:09 -07:00
Lee Jones fa6415affe clk: st: clk-flexgen: Detect critical clocks
Utilise the new Critical Clock infrastructure to mark clocks which
much not be disabled as CRITICAL.

While we're at it, reduce the coverage of the flex_flags variable,
since it's only really used in a single for() loop.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:17:06 -07:00
Stephen Boyd a31bb03263 Merge branch 'clk-hi6220-rtc' into clk-next
* clk-hi6220-rtc:
  clk: hi6220: Add RTC clock for pl031
2016-06-30 12:14:50 -07:00
Zhangfei Gao 6fb924dc9c clk: hi6220: Add RTC clock for pl031
Adds clk support for the pl031 RTC on hi6220

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Guodong Xu <guodong.xu@linaro.org>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
[jstultz: Forward ported, tweaked commit description]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-30 12:11:49 -07:00
Andrew Bresticker 15d68e8c2e clk: tegra: Initialize UTMI PLL when enabling PLLU
Move the UTMI PLL initialization code form clk-tegra<chip>.c files into
clk-pll.c. UTMI PLL was being configured and set in HW control right
after registration. However, when the clock init_table is processed and
child clks of PLLU are enabled, it will call in and enable PLLU as
well, and initiate SW enabling sequence even though PLLU is already in
HW control. This leads to getting UTMIPLL stuck with a SEQ_BUSY status.

Doing the initialization once during pllu_enable means we configure it
properly into HW control.

A side effect of the commonization/localization of the UTMI PLL init
code, is that it corrects some errors that were present for earlier
generations. For instance, in clk-tegra124.c, it used to have:

    #define UTMIP_PLL_CFG1_ENABLE_DLY_COUNT(x) (((x) & 0x1f) << 6)

when the correct shift to use is present in the new version:

    #define UTMIP_PLL_CFG1_ENABLE_DLY_COUNT(x) (((x) & 0x1f) << 27)

which matches the Tegra124 TRM register definition.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
[rklein: Merged in some later fixes for potential deadlocks]
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
[treding: coding style bike-shedding, remove unused variable]
Signed-off-by: Thierry Reding <treding@nvidia.com>
2016-06-30 17:43:17 +02:00
Stephen Boyd 5ff5ec59c4 Merge 'clk-notify' into clk-next
* clk-notify:
  clk: Provide notifier stubs when !COMMON_CLK
2016-06-29 10:54:13 -07:00
Stephen Boyd 629ff48669 clk: renesas: Updates for v4.8 (take two)
- Add support for R-Car V2H,
   - Add FDP1, DRIF, and thermal clocks on R-Car H3,
   - Correct a wrong parent clock.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXa+vcAAoJEEgEtLw/Ve77ZXYP/2Sdr+g7sfIOsjgS8FIEaEnM
 l7zvU73l39kpnPxIG5deCAcYd9lyIfTSwlCiK4/xbWFyteEhnltt0LfYterLUump
 zu1JLdpJjdd476M57QiwiaBxNvkQ2DCLab4oc3N0fMK3/Yc7HzrfS/uQKWvBGDHR
 xYhWEyE2YrmPmphI1KAiAV1r55lhHJ0+6EBAv3J2+zloNhmS/c7jdE2jKZkTuSle
 6sR1qzbcHFd1vSWZmzHuFOwYni2LmYUptzKUEYGuWKFeLsO6kIPVAs3Aa02jpmDz
 yl7N8cGYD+5JVIv/xnLOa3Gz2iXNhSjWMPGgI0o/PHMZxAg4oUiHGZXgx9rC9sXg
 AryADX+I5Bw0srs4sUQiBgLxQoW6Ti4U+i3wiYDAy/z9DnKTUiVnj1FHllkXeRKD
 SsEfgPLQBdZ9HxBE2zgI75R32uO69J3e0F/8AoWe2ga+wagrUVVbGR9KTJQp6/vB
 tgPPGaJGCevIBFivro/BWJEyXQmqgHTK8PiBvzcC0pztnWLVDNwR7HRyqhVDMPC5
 RO4Zi4vAydj+SuLyEVcTfRnL9S4M7101QlrGGF/JqQVOv5zTRDdC9Y4aaVXhFdcW
 5aYtFEPke8rIChMm8ps6FHIgG0i09hKuTx1B1W+1HYY8HFCGuJY2LPKWJGcPqVkq
 LObPH/YM7oCfrIhoGSQo
 =sXDx
 -----END PGP SIGNATURE-----

Merge tag 'clk-renesas-for-v4.8-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next

Pull second batch of Renesas clk driver updates from Geert
Uytterhoeven:

  - Add support for R-Car V2H,
  - Add FDP1, DRIF, and thermal clocks on R-Car H3,
  - Correct a wrong parent clock.

* tag 'clk-renesas-for-v4.8-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers:
  clk: renesas: r8a7795: Add THS/TSC clock
  clk: renesas: r8a7795: Add DRIF clock
  clk: renesas: r8a7795: Correct lvds clock parent
  clk: renesas: r8a7795: Provide FDP1 clocks
  clk: renesas: Add R8A7792 support
  clk: renesas: mstp: Document R8A7792 support
  clk: renesas: rcar-gen2: Document R8A7792 support
2016-06-29 10:53:31 -07:00
Krzysztof Kozlowski e81b87d22a clk: Provide notifier stubs when !COMMON_CLK
The clk notifier symbols are hidden by COMMON_CLK.  However on some
platforms HAVE_CLK might be set while COMMON_CLK not which leads to
compile test build errors like:

$ make.cross ARCH=sh
   drivers/devfreq/tegra-devfreq.c: In function 'tegra_actmon_rate_notify_cb':
>> drivers/devfreq/tegra-devfreq.c:391:16: error: 'POST_RATE_CHANGE' undeclared (first use in this function)
     if (action != POST_RATE_CHANGE)
                   ^
   drivers/devfreq/tegra-devfreq.c: In function 'tegra_devfreq_probe':
>> drivers/devfreq/tegra-devfreq.c:654:8: error: implicit declaration of function 'clk_notifier_register' [-Werror=implicit-function-declaration]
     err = clk_notifier_register(tegra->emc_clock, &tegra->rate_change_nb);
           ^

Export the macros and data type declarations outside of COMMON_CLK ifdef
and provide stubs to fix the compile testing.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-28 17:11:31 -07:00
Stephen Boyd b1683d3744 clk: renesas: Add support for R-Car M3-W
Add initial support for the Clock Pulse Generator and Module Standby and
 Software Reset modules on the Renesas R-Car M3-W SoC:
   - Basic core clocks,
   - SCIF2 (console) module clock,
   - INTC-AP (GIC) module clock.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXVUsJAAoJEEgEtLw/Ve779JMP/RBe2xa/etV3aCS2HKaknfnN
 oAbnnUkp1MuWjqXltfBidsMlqjBqtBWR/UAi0fBl1rhuT8oGgRiNqqJgUW8aZq0O
 f/HVl+aBM+cN+GLWkBXkvw/EbOVcyGgcCfoGyUJmZweVH0C991Nh+yX9va/H6Fh5
 bjZ5+/Ie7K59ePRzARzgjHtF4kMKS5hrlCKyqX5MtRWaDcCRJ+r9YuYo1olu+d8d
 37BIxLQ/i/js/so7sw6cAD8wttN+NW6d9KWL7ArG86rWLxDrhGE1nm1VH3p1mGzZ
 o3XZnybC5ULQv+iZLfCQDRPvvouhHKNaaO2uJkwvq293cC4Y3Nlll6W4637J4vgQ
 JvXugsPbpuIFlS0hToKVU3+fGdxlWIsqvjvPo5ZBmA42ByOcaVAKsyqVZ1gw8o0q
 1u9pRX3HEGILf5G2N5qJ6DsjVQBPYwZZ6PkywwMUdF3uE6A+yIPDclc74Fo7HXUO
 0yvh2keJcpn+Eyo1oPNR88cP6SY51PF2ZNscHGMO4ZTrFZ51fOe8FmynSvuZk9RY
 CislZFuRpnhdcrRPV9FjeJnJIzlEL4277c8OonzAndhqao/MJNHrZGewbEa8vEfG
 0FLzsqG5yaWy1hkp2Vd9AVUZjzrKu2p0Kl2iwfJz8bMEANQ6D3hbWVHfgLfnSYE6
 pAZMOQYAmci5md6VERuR
 =5UWd
 -----END PGP SIGNATURE-----

Merge tag 'clk-renesas-for-v4.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next

Pull support for Renesas R-car M3-W from Geert Uytterhoeven:

Add initial support for the Clock Pulse Generator and Module Standby and
Software Reset modules on the Renesas R-Car M3-W SoC:
  - Basic core clocks,
  - SCIF2 (console) module clock,
  - INTC-AP (GIC) module clock.

* tag 'clk-renesas-for-v4.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers:
  clk: renesas: cpg-mssr: Add support for R-Car M3-W
  clk: renesas: cpg-mssr: Extract common R-Car Gen3 support code
  clk: renesas: Add r8a7796 CPG Core Clock Definitions
  clk: renesas: cpg-mssr: Document r8a7796 support
2016-06-28 16:36:34 -07:00
Stephen Boyd 9e60de1cf2 clk: qcom: Remove gcc_aggre1_pnoc_ahb_clk from msm8996
This clk is critical to operation of the SoC and should never be
turned off. Furthermore, there are no consumers of this clk so
let's just delete it so things like eMMC work.

Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: b1e010c073 ("clk: qcom: Add MSM8996 Global Clock Control (GCC) driver")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-06-28 16:36:22 -07:00
Thierry Reding 74d3ba0b6f clk: tegra: Micro-optimize Tegra210 clock setup
sor_safe being the parent of the dpaux and dpaux1 clocks, it's not only
natural, but also slightly more efficient, to initialize it before its
children. This avoids orphaning the dpaux and dpaux1 clocks only to get
them reparented when the sor_safe clock is registered.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2016-06-23 17:47:03 +02:00
Thierry Reding 2e34c2ac16 clk: tegra: Make sor_safe the parent of dpaux and dpaux1
It turns out that sor_safe, rather than pll_p, is the parent of the
dpaux and dpaux1 clocks.

Acked-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2016-06-23 17:46:33 +02:00
Michael Turquette 367b30502d Merge remote-tracking branch 'clk/clk-s905' into clk-next 2016-06-22 18:20:12 -07:00
Michael Turquette 738f66d321 clk: gxbb: add AmLogic GXBB clk controller driver
The gxbb clock controller is the primary clock generation unit for the
AmLogic GXBB SoC. It is clocked by a fixed 24MHz xtal, contains several
PLLs and the usual post-dividers, muxes, dividers and leaf gates that
are fed into various IP blocks in the SoC.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:07:31 -07:00
Michael Turquette 2cc9e7ec21 clk: gxbb: Document bindings for the GXBB clock controller
Add documentations for the clock controller.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:07:31 -07:00
Michael Turquette 4a47295144 clk: meson: fractional pll support
Fractional MPLLs are a superset of the existing AmLogic MPLLs. They add
in a couple of new bitfields for further dividing the clock rate to
achieve rates with fractional hertz.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:05:47 -07:00
Michael Turquette 1c50da4f27 clk: meson: add mpll support
MPLLs are adjustable rate clocks derived from PLLs. On both Meson8b and
GXBB they appear to be only derived from fixed_pll.

Add support for these clock types so that they can be added to their
respective drivers.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:02:59 -07:00
Michael Turquette 73de5c8bcf clk: meson: add peripheral gate macro
There are a series of peripheral and system gate clocks that fan out
from the clk81 signal. Add a helper macro to statically initialize these
gate clocks.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:02:56 -07:00
Michael Turquette cb7c47d706 clk: meson: only build selected platforms
Break the AmLogic clock code up so that only the necessary parts are
compiled and linked. The core code is selected by both arm and arm64
builds with COMMON_CLK_AMLOGIC. The individual drivers have their own
config options as well.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:02:52 -07:00
Michael Turquette 796b9aa85d clk: meson8b: convert to platform_driver
This patch creates a proper platform_driver for the meson8b clock
controller. Use of CLK_OF_DECLARE is removed, and can be added back in
later if very early registration of some clocks is required.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:02:48 -07:00
Michael Turquette c0daa3e6f5 clk: meson8b: clean up composite clocks
Remove the composite clock registration function and helpers. Replace
unnecessary configuration struct with static initialization of the
desired clock type.

To preserve git bisect this patch also flips the switch and starts using
of_clk_add_hw_provider instead of the deprecated meson_clk_register_clks
method. As a byproduct clk.c can be deleted.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:02:44 -07:00
Michael Turquette ab95d6e8cc clk: meson8b: remove mali clk
This clock is undocumented and always orphaned. Get rid of it until we
have more complete clock tree documentation.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:02:40 -07:00
Michael Turquette 55d42c40dd clk: meson8b: clean up cpu clocks
Remove the cpu clock registration function and helpers. Replace
unnecessary configuration struct with static initialization of the
desired clock type.

Ninja rename a5_clk to cpu_clk to better align with cpufreq convention.

Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
2016-06-22 18:02:35 -07:00