All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/09] sh: div4 reparent workaround
@ 2010-05-11  7:05 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2010-05-11  7:05 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@opensource.se>

Update the div4 set_parent() callback to use the
flags instead of name to determine parent index.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/sh/kernel/cpu/clock-cpg.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- 0001/arch/sh/kernel/cpu/clock-cpg.c
+++ work/arch/sh/kernel/cpu/clock-cpg.c	2010-05-11 14:38:56.000000000 +0900
@@ -168,7 +168,12 @@ static int sh_clk_div4_set_parent(struct
 	u32 value;
 	int ret;
 
-	if (!strcmp("pll_clk", parent->name))
+	/* we really need a better way to determine parent index, but for
+	 * now assume internal parent comes with CLK_ENABLE_ON_INIT set,
+	 * no CLK_ENABLE_ON_INIT means external clock...
+	 */
+
+	if (parent->flags & CLK_ENABLE_ON_INIT)
 		value = __raw_readl(clk->enable_reg) & ~(1 << 7);
 	else
 		value = __raw_readl(clk->enable_reg) | (1 << 7);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-11  7:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11  7:05 [PATCH 01/09] sh: div4 reparent workaround Magnus Damm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.