提交 d40db0c4 编写于 作者: M Magnus Damm 提交者: Paul Mundt

sh: div4 reparent workaround

Update the div4 set_parent() callback to use the
flags instead of name to determine parent index.
Signed-off-by: NMagnus Damm <damm@opensource.se>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 c77a9c3e
...@@ -168,7 +168,12 @@ static int sh_clk_div4_set_parent(struct clk *clk, struct clk *parent) ...@@ -168,7 +168,12 @@ static int sh_clk_div4_set_parent(struct clk *clk, struct clk *parent)
u32 value; u32 value;
int ret; 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); value = __raw_readl(clk->enable_reg) & ~(1 << 7);
else else
value = __raw_readl(clk->enable_reg) | (1 << 7); value = __raw_readl(clk->enable_reg) | (1 << 7);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册