Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1402106
| From | Erin Lo <erin.lo@mediatek.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v8 01/10] clk: fix initial state of critical clock's parents |
| Date | 2016-05-17 07:10 +0200 |
| Message-ID | <rzFqy-fn-27@gated-at.bofh.it> (permalink) |
| References | <rzFqx-fn-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: James Liao <jamesjj.liao@mediatek.com>
This patch fixed wrong state of parent clocks if they are registered
after critical clocks.
Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
---
drivers/clk/clk.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ce39add..bf80e39 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2388,8 +2388,15 @@ static int __clk_core_init(struct clk_core *core)
hlist_for_each_entry_safe(orphan, tmp2, &clk_orphan_list, child_node) {
struct clk_core *parent = __clk_init_parent(orphan);
- if (parent)
+ if (parent) {
clk_core_reparent(orphan, parent);
+
+ if (orphan->prepare_count)
+ clk_core_prepare(parent);
+
+ if (orphan->enable_count)
+ clk_core_enable(parent);
+ }
}
/*
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v8 0/10] Add clock support for Mediatek MT2701 Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:10 +0200 [PATCH v8 10/10] arm: dts: mt2701: Use real clock for UARTs Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:10 +0200 [PATCH v8 04/10] dt-bindings: ARM: Mediatek: Document bindings for MT2701 Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:10 +0200 [PATCH v8 08/10] reset: mediatek: Add MT2701 reset driver Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:10 +0200 [PATCH v8 09/10] arm: dts: mt2701: Add clock controller device nodes Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:10 +0200 [PATCH v8 05/10] clk: mediatek: Add dt-bindings for MT2701 clocks Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:10 +0200 [PATCH v8 01/10] clk: fix initial state of critical clock's parents Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:10 +0200 [PATCH v8 02/10] clk: mediatek: remove __init from clk registration functions Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:10 +0200 [PATCH v8 07/10] reset: mediatek: Add MT2701 reset controller dt-binding file Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:20 +0200 [PATCH v8 03/10] clk: mediatek: Refine the makefile to support multiple clock drivers Erin Lo <erin.lo@mediatek.com> - 2016-05-17 07:20 +0200
csiph-web