From patchwork Wed Dec 3 08:53:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 417295 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9A93D1400DD for ; Wed, 3 Dec 2014 19:58:04 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 8AA631A0CCE for ; Wed, 3 Dec 2014 19:58:04 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48DDB1A0C33 for ; Wed, 3 Dec 2014 19:56:11 +1100 (AEDT) Received: by mail-pa0-f42.google.com with SMTP id et14so15339477pad.15 for ; Wed, 03 Dec 2014 00:56:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=n+0KdXl3f73lQt/T3M2Ae8xjfMg2ExxL5KHDNpbHkZA=; b=CwOJj4H75oUwsRVvEENmu63+3HKZGOP3sWHHxX/7AtIMLgiOCVcxQf/dT8SdcSOkrE BvwZ5QCN0QGLHP6uQs8Za4tkOJZP0M5gniAzyhCGnkBduH83D0CqiM0c+PgCZk1wBxkV jgMST3xOTPNnWHS1tzC95GXKsoCuHGxLyk/NANxQoWFRF4VMRtQ4LV/I2vIMGMMVg/p8 bdqMyupt27ZStMUCGPNiGOcluMF5n4H+Mq+hC/AxfZBbZyzukdpHstRtJtfs1vaupBWU lcVVYjOEETkDjuEPcGvX477l09ED42QiN80K6b0Tr/4Ce7OqMHaiFMSwtTnaFdiWHW8D CR8A== X-Received: by 10.70.55.102 with SMTP id r6mr6500386pdp.55.1417596969292; Wed, 03 Dec 2014 00:56:09 -0800 (PST) Received: from pek-khao-d1.corp.ad.wrs.com ([106.120.101.38]) by mx.google.com with ESMTPSA id w4sm11765738pdq.28.2014.12.03.00.56.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Dec 2014 00:56:08 -0800 (PST) From: Kevin Hao To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v3 2/3] powerpc: call of_clk_init() from time_init() Date: Wed, 3 Dec 2014 16:53:52 +0800 Message-Id: <1417596833-31456-3-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1417596833-31456-1-git-send-email-haokexin@gmail.com> References: <1417596833-31456-1-git-send-email-haokexin@gmail.com> Cc: Mike Turquette , Gerhard Sittig , Yuantian Tang , Jingchang Lu , Scott Wood X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" So the boards which has COMMON_CLK enabled don't have to invoke this in its board specific file. Signed-off-by: Kevin Hao Acked-by: Scott Wood Acked-by: Michael Turquette --- v3: Add ack. v2: A new patch in v2. arch/powerpc/kernel/time.c | 5 +++++ arch/powerpc/platforms/512x/clock-commonclk.c | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index fa7c4f12104f..df9fa05b5fd3 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -943,6 +944,10 @@ void __init time_init(void) init_decrementer_clockevent(); tick_setup_hrtimer_broadcast(); + +#ifdef CONFIG_COMMON_CLK + of_clk_init(NULL); +#endif } diff --git a/arch/powerpc/platforms/512x/clock-commonclk.c b/arch/powerpc/platforms/512x/clock-commonclk.c index 6eb614a271fb..f691bcabd710 100644 --- a/arch/powerpc/platforms/512x/clock-commonclk.c +++ b/arch/powerpc/platforms/512x/clock-commonclk.c @@ -1168,6 +1168,11 @@ static void mpc5121_clk_provide_backwards_compat(void) } } +/* + * The "fixed-clock" nodes (which includes the oscillator node if the board's + * DT provides one) has already been scanned by the of_clk_init() in + * time_init(). + */ int __init mpc5121_clk_init(void) { struct device_node *clk_np; @@ -1187,12 +1192,6 @@ int __init mpc5121_clk_init(void) mpc512x_clk_preset_data(); /* - * have the device tree scanned for "fixed-clock" nodes (which - * includes the oscillator node if the board's DT provides one) - */ - of_clk_init(NULL); - - /* * add a dummy clock for those situations where a clock spec is * required yet no real clock is involved */