Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1428505 > unrolled thread

[PATCH v9 01/10] clk: fix initial state of critical clock's parents

Started byErin Lo <erin.lo@mediatek.com>
First post2016-06-22 09:50 +0200
Last post2016-06-22 09:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v9 01/10] clk: fix initial state of critical clock's parents Erin Lo <erin.lo@mediatek.com> - 2016-06-22 09:50 +0200

#1428505 — [PATCH v9 01/10] clk: fix initial state of critical clock's parents

FromErin Lo <erin.lo@mediatek.com>
Date2016-06-22 09:50 +0200
Subject[PATCH v9 01/10] clk: fix initial state of critical clock's parents
Message-ID<rML58-wN-27@gated-at.bofh.it>
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>
Signed-off-by: Erin Lo <erin.lo@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 d584004..e9f5f89 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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web