From patchwork Fri Sep 9 12:19:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg Ungerer X-Patchwork-Id: 114092 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 A39A1B6FA3 for ; Fri, 9 Sep 2011 22:19:35 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 18031282A7; Fri, 9 Sep 2011 14:19:32 +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 dWBGfIkrGsjv; Fri, 9 Sep 2011 14:19:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 437A32828B; Fri, 9 Sep 2011 14:19:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2E2282824E for ; Fri, 9 Sep 2011 14:19: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 GfuKtGUGH86U for ; Fri, 9 Sep 2011 14:19:21 +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 outbound-mail04.westnet.com.au (outbound-mail04.westnet.com.au [203.10.1.245]) by theia.denx.de (Postfix) with ESMTP id 5DBF1281FF for ; Fri, 9 Sep 2011 14:19:18 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjAHAF0Dak58qlD7/2dsb2JhbABBhFWUZI5UeYF8DwEjIzUCJgI7N64ZhA2OEYEshDGBEQSbf4hl X-IronPort-AV: E=Sophos;i="4.68,356,1312128000"; d="scan'208";a="734832113" Received: from 124-170-80-251.dyn.iinet.net.au (HELO localhost.localdomain) ([124.170.80.251]) by outbound-mail04.westnet.com.au with ESMTP; 09 Sep 2011 20:19:14 +0800 From: Greg Ungerer To: u-boot@lists.denx.de Date: Fri, 9 Sep 2011 22:19:10 +1000 Message-Id: <1315570750-472-1-git-send-email-greg.ungerer@opengear.com> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 Cc: Greg Ungerer Subject: [U-Boot] [PATCH] KS8695: move TIMER_ definitions before code use 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 Move the TIMER_ definitions before they are used in KS8695 timer.c code. Fixes: timer.c: In function ‘timer_init’: timer.c:37: error: ‘TIMER_COUNT’ undeclared (first use in this function) timer.c:37: error: (Each undeclared identifier is reported only once timer.c:37: error: for each function it appears in.) timer.c:38: error: ‘TIMER_PULSE’ undeclared (first use in this function) Signed-off-by: Greg Ungerer --- arch/arm/cpu/arm920t/ks8695/timer.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/cpu/arm920t/ks8695/timer.c b/arch/arm/cpu/arm920t/ks8695/timer.c index 234fe91..0852502 100644 --- a/arch/arm/cpu/arm920t/ks8695/timer.c +++ b/arch/arm/cpu/arm920t/ks8695/timer.c @@ -24,6 +24,14 @@ #include /* + * Initial timer set constants. Nothing complicated, just set for a 1ms + * tick. + */ +#define TIMER_INTERVAL (TICKS_PER_uSEC * mSEC_1) +#define TIMER_COUNT (TIMER_INTERVAL / 2) +#define TIMER_PULSE TIMER_COUNT + +/* * Handy KS8695 register access functions. */ #define ks8695_read(a) *((volatile ulong *) (KS8695_IO_BASE + (a))) @@ -42,14 +50,6 @@ int timer_init (void) return 0; } -/* - * Initial timer set constants. Nothing complicated, just set for a 1ms - * tick. - */ -#define TIMER_INTERVAL (TICKS_PER_uSEC * mSEC_1) -#define TIMER_COUNT (TIMER_INTERVAL / 2) -#define TIMER_PULSE TIMER_COUNT - ulong get_timer_masked(void) { /* Check for timer wrap */