From patchwork Wed Mar 4 14:21:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 5936431 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7C41C9F380 for ; Wed, 4 Mar 2015 14:22:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFE6820295 for ; Wed, 4 Mar 2015 14:22:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB8D9200E3 for ; Wed, 4 Mar 2015 14:22:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758243AbbCDOWd (ORCPT ); Wed, 4 Mar 2015 09:22:33 -0500 Received: from down.free-electrons.com ([37.187.137.238]:47199 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758424AbbCDOVt (ORCPT ); Wed, 4 Mar 2015 09:21:49 -0500 Received: by mail.free-electrons.com (Postfix, from userid 106) id 9D5E43B1; Wed, 4 Mar 2015 15:21:49 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (128-79-216-6.hfc.dyn.abo.bbox.fr [128.79.216.6]) by mail.free-electrons.com (Postfix) with ESMTPSA id 616BB38E; Wed, 4 Mar 2015 15:21:49 +0100 (CET) From: Alexandre Belloni To: Nicolas Ferre , Daniel Lezcano Cc: Boris Brezillon , Jean-Christophe Plagniol-Villard , Thomas Gleixner , Lee Jones , Wim Van Sebroeck , Guenter Roeck , Sebastian Reichel , Dmitry Eremin-Solenikov , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, linux-pm@vger.kernel.org, Alexandre Belloni Subject: [PATCH v3 7/9] clocksource: atmel-st: properly initialize driver Date: Wed, 4 Mar 2015 15:21:35 +0100 Message-Id: <1425478897-27322-8-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1425478897-27322-1-git-send-email-alexandre.belloni@free-electrons.com> References: <1425478897-27322-1-git-send-email-alexandre.belloni@free-electrons.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use clocksource_of_init to initialize the system timer instead of relying on a custom function. Signed-off-by: Alexandre Belloni Acked-by: Boris Brezillon --- arch/arm/mach-at91/at91rm9200.c | 7 ------- arch/arm/mach-at91/generic.h | 3 --- drivers/clocksource/timer-atmel-st.c | 4 +++- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 2386d08d65e8..5efb075294e5 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -26,12 +26,6 @@ #include "generic.h" -static void __init at91rm9200_dt_timer_init(void) -{ - of_clk_init(NULL); - at91rm9200_timer_init(); -} - static void __init at91rm9200_dt_device_init(void) { of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); @@ -48,7 +42,6 @@ static const char *at91rm9200_dt_board_compat[] __initconst = { }; DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200") - .init_time = at91rm9200_dt_timer_init, .map_io = at91_map_io, .init_machine = at91rm9200_dt_device_init, .dt_compat = at91rm9200_dt_board_compat, diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 583369ffc284..6c953bff13d6 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h @@ -18,9 +18,6 @@ extern void __init at91_map_io(void); extern void __init at91_alt_map_io(void); - /* Timer */ -extern void at91rm9200_timer_init(void); - /* idle */ extern void at91rm9200_idle(void); extern void at91sam9_idle(void); diff --git a/drivers/clocksource/timer-atmel-st.c b/drivers/clocksource/timer-atmel-st.c index b00d09555f2b..7d062ab32674 100644 --- a/drivers/clocksource/timer-atmel-st.c +++ b/drivers/clocksource/timer-atmel-st.c @@ -222,7 +222,7 @@ err: /* * ST (system timer) module supports both clockevents and clocksource. */ -void __init at91rm9200_timer_init(void) +static void __init atmel_st_timer_init(struct device_node *node) { /* For device tree enabled device: initialize here */ of_at91rm9200_st_init(); @@ -249,3 +249,5 @@ void __init at91rm9200_timer_init(void) /* register clocksource */ clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK); } +CLOCKSOURCE_OF_DECLARE(atmel_st_timer, "atmel,at91rm9200-st", + atmel_st_timer_init);