浏览代码

AT91: clock: peripheral clocks can have other parent than mck

While registering clock allow to set parent clock other
than mck. It is useful for clocks than can be seen as
child clock of a peripheral.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Nicolas Ferre 14 年之前
父节点
当前提交
5afddee415
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      arch/arm/mach-at91/clock.c

+ 2 - 1
arch/arm/mach-at91/clock.c

@@ -501,7 +501,8 @@ postcore_initcall(at91_clk_debugfs_init);
 int __init clk_register(struct clk *clk)
 int __init clk_register(struct clk *clk)
 {
 {
 	if (clk_is_peripheral(clk)) {
 	if (clk_is_peripheral(clk)) {
-		clk->parent = &mck;
+		if (!clk->parent)
+			clk->parent = &mck;
 		clk->mode = pmc_periph_mode;
 		clk->mode = pmc_periph_mode;
 		list_add_tail(&clk->node, &clocks);
 		list_add_tail(&clk->node, &clocks);
 	}
 	}