From patchwork Tue Aug 30 13:00:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stany MARCEL X-Patchwork-Id: 112284 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 D2C95B6F71 for ; Tue, 30 Aug 2011 23:12:26 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9A96E280BF; Tue, 30 Aug 2011 15:12:24 +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 9B+GW2uCHI7g; Tue, 30 Aug 2011 15:12:24 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EC43C280C0; Tue, 30 Aug 2011 15:12:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EC620280C0 for ; Tue, 30 Aug 2011 15:12:19 +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 wnof1QltY-js for ; Tue, 30 Aug 2011 15:12:19 +0200 (CEST) X-Greylist: delayed 723 seconds by postgrey-1.27 at theia; Tue, 30 Aug 2011 15:12:17 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 1739A28099 for ; Tue, 30 Aug 2011 15:12:17 +0200 (CEST) Received: from [192.168.134.138] ([192.168.0.148]) by ATLAS.pactenovation.fr over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Tue, 30 Aug 2011 15:01:28 +0200 Message-ID: <4E5CDEDA.40808@novasys-ingenierie.com> Date: Tue, 30 Aug 2011 15:00:10 +0200 From: stany MARCEL Organization: NOVASYS Ingenierie User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20) Gecko/20110805 Thunderbird/3.1.12 MIME-Version: 1.0 To: u-boot@lists.denx.de X-OriginalArrivalTime: 30 Aug 2011 13:01:28.0765 (UTC) FILETIME=[EEA43ED0:01CC6714] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-6.500.1024-18354.007 X-TM-AS-Result: No--3.863400-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Cc: jason.jin@freescale.com Subject: [U-Boot] [PATCH 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de timer_init protorype change for uniformization with other architectures Signed-off-by: Stany MARCEL --- arch/m68k/cpu/mcf547x_8x/slicetimer.c | 4 +++- arch/m68k/lib/board.c | 2 +- arch/m68k/lib/time.c | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) 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..694289e 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -78,7 +78,7 @@ static char *failed = "*** failed ***\n"; extern ulong __init_end; extern ulong __bss_end__; -extern void timer_init(void); +extern int timer_init(void); #if defined(CONFIG_WATCHDOG) # define INIT_FUNC_WATCHDOG_INIT watchdog_init, 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)