From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-we0-f173.google.com ([74.125.82.173]:44635 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbbAOQF6 (ORCPT ); Thu, 15 Jan 2015 11:05:58 -0500 Received: by mail-we0-f173.google.com with SMTP id q58so15570390wes.4 for ; Thu, 15 Jan 2015 08:05:57 -0800 (PST) Message-ID: <54B7E561.8090008@linaro.org> Date: Thu, 15 Jan 2015 17:05:53 +0100 From: Daniel Lezcano MIME-Version: 1.0 To: Alexandre Belloni , Nicolas Ferre CC: Boris Brezillon , Jean-Christophe Plagniol-Villard , Thomas Gleixner , Samuel Ortiz , Lee Jones , Wim Van Sebroeck , Guenter Roeck , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org Subject: Re: [PATCH v3 6/8] clocksource: atmel-st: properly initialize driver References: <1421077023-30954-1-git-send-email-alexandre.belloni@free-electrons.com> <1421077023-30954-7-git-send-email-alexandre.belloni@free-electrons.com> In-Reply-To: <1421077023-30954-7-git-send-email-alexandre.belloni@free-electrons.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: linux-watchdog-owner@vger.kernel.org List-Id: linux-watchdog@vger.kernel.org On 01/12/2015 04:37 PM, Alexandre Belloni wrote: > Use clocksource_of_init to initialize the system timer instead of rel= ying on a > custom function. > > Signed-off-by: Alexandre Belloni > Acked-by: Boris Brezillon Acked-by: Daniel Lezcano > --- > arch/arm/mach-at91/board-dt-rm9200.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/board-dt-rm9200.c b/arch/arm/mach-at9= 1/board-dt-rm9200.c > index 76dfe8f9af50..d9a45f49c208 100644 > --- a/arch/arm/mach-at91/board-dt-rm9200.c > +++ b/arch/arm/mach-at91/board-dt-rm9200.c > @@ -24,19 +24,12 @@ > > #include "generic.h" > > -static void __init at91rm9200_dt_timer_init(void) > -{ > - of_clk_init(NULL); > - at91rm9200_timer_init(); > -} > - > static const char *at91rm9200_dt_board_compat[] __initdata =3D { > "atmel,at91rm9200", > NULL > }; > > DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)") > - .init_time =3D at91rm9200_dt_timer_init, > .map_io =3D at91_map_io, > .init_early =3D at91rm9200_dt_initialize, > .dt_compat =3D at91rm9200_dt_board_compat, > diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generi= c.h > index d53324210adf..fc12f3d4b93c 100644 > --- a/arch/arm/mach-at91/generic.h > +++ b/arch/arm/mach-at91/generic.h > @@ -29,9 +29,6 @@ extern void __init at91_dt_initialize(void); > extern void __init at91_sysirq_mask_rtc(u32 rtc_base); > extern void __init at91_sysirq_mask_rtt(u32 rtt_base); > > - /* Timer */ > -extern void at91rm9200_timer_init(void); > - > /* idle */ > extern void at91sam9_idle(void); > > diff --git a/drivers/clocksource/timer-atmel-st.c b/drivers/clocksour= ce/timer-atmel-st.c > index 522583d6cc78..ed0267f1c892 100644 > --- a/drivers/clocksource/timer-atmel-st.c > +++ b/drivers/clocksource/timer-atmel-st.c > @@ -232,7 +232,7 @@ err: > /* > * ST (system timer) module supports both clockevents and clocksour= ce. > */ > -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(); > @@ -261,3 +261,5 @@ void __init at91rm9200_timer_init(void) > > arm_pm_restart =3D at91rm9200_restart; > } > +CLOCKSOURCE_OF_DECLARE(atmel_st_timer, "atmel,at91rm9200-st", > + atmel_st_timer_init); > --=20 Linaro.org =E2=94=82 Open source software fo= r ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-watchdo= g" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html