From patchwork Wed Aug 31 12:09:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: y@theia.denx.de X-Patchwork-Id: 112545 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 71768B6F76 for ; Wed, 31 Aug 2011 22:23:02 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D413C2812B; Wed, 31 Aug 2011 14:22:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dBnrUAArTSJm; Wed, 31 Aug 2011 14:22:48 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 66DF22810E; Wed, 31 Aug 2011 14:22:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C3C81280E5 for ; Wed, 31 Aug 2011 14:22:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X+s2Lb80uj5d for ; Wed, 31 Aug 2011 14:22:22 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from ATLAS.pactenovation.fr (smtp.pactenovation.fr [195.5.242.163]) by theia.denx.de (Postfix) with ESMTP id 7A9D9280E0 for ; Wed, 31 Aug 2011 14:22:21 +0200 (CEST) Received: from ubuntu ([192.168.0.148]) by ATLAS.pactenovation.fr over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Wed, 31 Aug 2011 14:11:11 +0200 From: y@theia.denx.de To: u-boot@lists.denx.de Date: Wed, 31 Aug 2011 14:09:17 +0200 Message-Id: <1314792557-9021-1-git-send-email-y> X-Mailer: git-send-email 1.7.1 In-Reply-To: <4E5CDEDA.40808@novasys-ingenierie.com> References: <4E5CDEDA.40808@novasys-ingenierie.com> X-Antivirus: avast! (VPS 110831-0, 31/08/2011), Outbound message X-Antivirus-Status: Clean X-OriginalArrivalTime: 31 Aug 2011 12:11:11.0328 (UTC) FILETIME=[1285A600:01CC67D7] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.500.1024-18356.006 X-TM-AS-Result: No--6.315000-4.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Cc: Stany MARCEL , jason.jin@freescale.com, vapier@gento.org Subject: [U-Boot] [PATCH v2 1/5] coldfire: Change timer_init return type from void to int X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Stany MARCEL timer_init protorype change for uniformization with other architectures Signed-off-by: Stany MARCEL --- Changes for v2: - Remove extern of timer_init arch/m68k/cpu/mcf547x_8x/slicetimer.c | 4 +++- arch/m68k/lib/board.c | 2 -- arch/m68k/lib/time.c | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) -- 1.7.1 diff --git a/arch/m68k/cpu/mcf547x_8x/slicetimer.c b/arch/m68k/cpu/mcf547x_8x/slicetimer.c index 467a807..ee96aad 100644 --- a/arch/m68k/cpu/mcf547x_8x/slicetimer.c +++ b/arch/m68k/cpu/mcf547x_8x/slicetimer.c @@ -72,7 +72,7 @@ void dtimer_interrupt(void *not_used) } } -void timer_init(void) +int timer_init(void) { volatile slt_t *timerp = (slt_t *) (CONFIG_SYS_TMR_BASE); @@ -93,6 +93,8 @@ void timer_init(void) /* set a period of 1us, set timer mode to restart and enable timer and interrupt */ timerp->cr = SLT_CR_RUN | SLT_CR_IEN | SLT_CR_TEN; + + return 0; } ulong get_timer(ulong base) diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index 945ab66..1df50f1 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -78,8 +78,6 @@ static char *failed = "*** failed ***\n"; extern ulong __init_end; extern ulong __bss_end__; -extern void timer_init(void); - #if defined(CONFIG_WATCHDOG) # define INIT_FUNC_WATCHDOG_INIT watchdog_init, # define WATCHDOG_DISABLE watchdog_disable diff --git a/arch/m68k/lib/time.c b/arch/m68k/lib/time.c index a316cdf..a1eb983 100644 --- a/arch/m68k/lib/time.c +++ b/arch/m68k/lib/time.c @@ -91,7 +91,7 @@ void dtimer_interrupt(void *not_used) } } -void timer_init(void) +int timer_init(void) { volatile dtmr_t *timerp = (dtmr_t *) (CONFIG_SYS_TMR_BASE); @@ -114,6 +114,8 @@ void timer_init(void) /* set a period of 1us, set timer mode to restart and enable timer and interrupt */ timerp->tmr = CONFIG_SYS_TIMER_PRESCALER | DTIM_DTMR_CLK_DIV1 | DTIM_DTMR_FRR | DTIM_DTMR_ORRI | DTIM_DTMR_RST_EN; + + return 0; } ulong get_timer(ulong base) @@ -153,7 +155,7 @@ void __udelay(unsigned long usec) } } -void timer_init(void) +int timer_init(void) { volatile pit_t *timerp = (pit_t *) (CONFIG_SYS_PIT_BASE); timestamp = 0; @@ -162,6 +164,8 @@ void timer_init(void) timerp->pcsr = PIT_PCSR_OVW; timerp->pmr = lastinc = 0; timerp->pcsr |= PIT_PCSR_PRE(CONFIG_SYS_PIT_PRESCALE) | PIT_PCSR_EN; + + return 0; } ulong get_timer(ulong base)