diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-04-28 17:13:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-04-28 17:13:56 -0700 |
commit | 35655ceb31b56cd1cb52635a725dfcdb9662d7b7 (patch) | |
tree | 8cff3e89111cc26143aee74930ec1f4a49d6682d /drivers/clk/clk.c | |
parent | d8201efe75e13146ebde433745c7920e15593baf (diff) | |
parent | 3ba2d41dca14e1afbea0c41ba8164064df407c8b (diff) |
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk updates from Stephen Boyd:
"Here's a collection of largely clk driver updates. The usual suspects
are here: i.MX, Qualcomm, Renesas, Allwinner, Samsung, and Rockchip,
but it feels pretty light on commits.
There's only one real commit to the framework core and that's to
consolidate code. Otherwise the diffstat is dominated by many Qualcomm
clk driver patches that modernize the driver for the proper way of
speciying clk parents. That's shifting data around, which could subtly
break things so I'll be on the lookout for fixes.
New Drivers:
- Proper clk driver for Mediatek MT7621 SoCs
- Support for the clock controller on the new Rockchip rk3568
Updates:
- Simplify Zynq Kconfig dependencies
- Use clk_hw pointers in socfpga driver
- Cleanup parent data in qcom clk drivers
- Some cleanups for rk3399 modularization
- Fix reparenting of i.MX UART clocks by initializing only the ones
associated to stdout
- Correct the PCIE clocks for i.MX8MP and i.MX8MQ
- Make i.MX LPCG and SCU clocks return on registering failure
- Kernel doc fixes
- Add DAB hardware accelerator clocks on Renesas R-Car E3 and M3-N
- Add timer (TMU) clocks on Renesas R-Car H3 ES1.0
- Add Timer (TMU & CMT) and thermal sensor (TSC) clocks on
Renesas R-Car V3U
- Sigma-delta modulation on Allwinner V3s audio PLL"
* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (82 commits)
MAINTAINERS: add MT7621 CLOCK maintainer
staging: mt7621-dts: use valid vendor 'mediatek' instead of invalid 'mtk'
staging: mt7621-dts: make use of new 'mt7621-clk'
clk: ralink: add clock driver for mt7621 SoC
clk: uniphier: Fix potential infinite loop
clk: qcom: rpmh: add support for SDX55 rpmh IPA clock
clk: qcom: gcc-sdm845: get rid of the test clock
clk: qcom: convert SDM845 Global Clock Controller to parent_data
dt-bindings: clock: separate SDM845 GCC clock bindings
clk: qcom: apss-ipq-pll: Add missing MODULE_DEVICE_TABLE
clk: qcom: a53-pll: Add missing MODULE_DEVICE_TABLE
clk: qcom: a7-pll: Add missing MODULE_DEVICE_TABLE
dt: bindings: add mt7621-sysc device tree binding documentation
dt-bindings: clock: add dt binding header for mt7621 clocks
clk: samsung: Remove redundant dev_err calls
clk: zynqmp: pll: add set_pll_mode to check condition in zynqmp_pll_enable
clk: zynqmp: move zynqmp_pll_set_mode out of round_rate callback
clk: zynqmp: Drop dependency on ARCH_ZYNQMP
clk: zynqmp: Enable the driver if ZYNQMP_FIRMWARE is selected
clk: qcom: gcc-sm8350: use ARRAY_SIZE instead of specifying num_parents
...
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r-- | drivers/clk/clk.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index a3b30f7de2ef..e2ec1b745243 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1330,7 +1330,7 @@ static int clk_core_determine_round_nolock(struct clk_core *core, return 0; /* - * At this point, core protection will be disabled if + * At this point, core protection will be disabled * - if the provider is not protected at all * - if the calling consumer is the only one which has exclusivity * over the provider @@ -2078,12 +2078,8 @@ static void clk_change_rate(struct clk_core *core) return; if (core->flags & CLK_SET_RATE_UNGATE) { - unsigned long flags; - clk_core_prepare(core); - flags = clk_enable_lock(); - clk_core_enable(core); - clk_enable_unlock(flags); + clk_core_enable_lock(core); } if (core->new_parent && core->new_parent != core->parent) { @@ -2116,11 +2112,7 @@ static void clk_change_rate(struct clk_core *core) core->rate = clk_recalc(core, best_parent_rate); if (core->flags & CLK_SET_RATE_UNGATE) { - unsigned long flags; - - flags = clk_enable_lock(); - clk_core_disable(core); - clk_enable_unlock(flags); + clk_core_disable_lock(core); clk_core_unprepare(core); } @@ -3564,8 +3556,6 @@ static int __clk_core_init(struct clk_core *core) * reparenting clocks */ if (core->flags & CLK_IS_CRITICAL) { - unsigned long flags; - ret = clk_core_prepare(core); if (ret) { pr_warn("%s: critical clk '%s' failed to prepare\n", @@ -3573,9 +3563,7 @@ static int __clk_core_init(struct clk_core *core) goto out; } - flags = clk_enable_lock(); - ret = clk_core_enable(core); - clk_enable_unlock(flags); + ret = clk_core_enable_lock(core); if (ret) { pr_warn("%s: critical clk '%s' failed to enable\n", __func__, core->name); |