From: Nicolas Ferre Date: Thu, 9 Sep 2010 17:58:23 +0000 (+0200) Subject: AT91: clock: peripheral clocks can have other parent than mck X-Git-Tag: v3.0~3390^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5afddee415c829704d3a91031ae634008bc332e9;p=platform%2Fkernel%2Flinux-amlogic.git 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 Acked-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Andrew Victor --- diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index 7f7da43..7525cee 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c @@ -501,7 +501,8 @@ postcore_initcall(at91_clk_debugfs_init); int __init clk_register(struct clk *clk) { if (clk_is_peripheral(clk)) { - clk->parent = &mck; + if (!clk->parent) + clk->parent = &mck; clk->mode = pmc_periph_mode; list_add_tail(&clk->node, &clocks); }