From patchwork Wed Feb 8 08:49:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prafulla Wadaskar X-Patchwork-Id: 140058 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 4C5B6B6EE8 for ; Wed, 8 Feb 2012 16:26:58 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5E6492808F; Wed, 8 Feb 2012 06:26:54 +0100 (CET) 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 VwX4UDUSa1p2; Wed, 8 Feb 2012 06:26:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 93CD928085; Wed, 8 Feb 2012 06:26:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A87DE28085 for ; Wed, 8 Feb 2012 06:26:49 +0100 (CET) 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 gDYU58W-ukaS for ; Wed, 8 Feb 2012 06:26:48 +0100 (CET) X-Greylist: delayed 935 seconds by postgrey-1.27 at theia; Wed, 08 Feb 2012 06:26:46 CET 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 na3sys009aog115.obsmtp.com (na3sys009aog115.obsmtp.com [74.125.149.238]) by theia.denx.de (Postfix) with SMTP id 80AAE28084 for ; Wed, 8 Feb 2012 06:26:43 +0100 (CET) Received: from MSI-MTA.marvell.com ([65.219.4.132]) by na3sys009aob115.postini.com ([74.125.148.12]) with SMTP ID DSNKTzIHkkKN51gE1SSSAF7wt35d94cPwmUW@postini.com; Tue, 07 Feb 2012 21:26:47 PST Received: from maili.marvell.com ([10.68.76.210]) by MSI-MTA.marvell.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 7 Feb 2012 21:10:41 -0800 Received: from localhost.localdomain (unknown [10.31.131.44]) by maili.marvell.com (Postfix) with ESMTP id A8F974E4BC; Tue, 7 Feb 2012 21:10:40 -0800 (PST) Received: from localhost.localdomain (pe-dt061 [127.0.0.1]) by localhost.localdomain (8.14.1/8.14.1) with ESMTP id q188nx1G016092; Wed, 8 Feb 2012 14:19:59 +0530 Received: (from prafulla@localhost) by localhost.localdomain (8.14.1/8.14.1/Submit) id q188nxtu016091; Wed, 8 Feb 2012 14:19:59 +0530 From: Prafulla Wadaskar To: u-boot@lists.denx.de Date: Wed, 8 Feb 2012 14:19:59 +0530 Message-Id: <1328690999-16077-1-git-send-email-prafulla@marvell.com> X-Mailer: git-send-email 1.5.3.4 X-OriginalArrivalTime: 08 Feb 2012 05:10:41.0238 (UTC) FILETIME=[00B92F60:01CCE620] Cc: Ashish Karkare , Prabhanjan Sarnaik Subject: [U-Boot] [PATCH] bugfix: all Marvell specific build fails due to undefined reference to `get_ticks' X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 after http://patchwork.ozlabs.org/patch/136415/ was applied. All Marvell build fails with below error common/libcommon.o: In function `cread_line': /home/uboot/src/u-boot-arm/common/main.c:717: undefined reference to `get_ticks' /home/uboot/src/u-boot-arm/common/main.c:717: undefined reference to `get_tbclk' /home/uboot/src/u-boot-arm/common/main.c:720: undefined reference to `get_ticks' The same is fixed for Kirkwood, ARMADA100, pantheon and orion5x SoCs Signed-off-by: Prafulla Wadaskar --- arch/arm/cpu/arm926ejs/armada100/timer.c | 21 +++++++++++++++++++++ arch/arm/cpu/arm926ejs/kirkwood/timer.c | 21 +++++++++++++++++++++ arch/arm/cpu/arm926ejs/orion5x/timer.c | 21 +++++++++++++++++++++ arch/arm/cpu/arm926ejs/pantheon/timer.c | 21 +++++++++++++++++++++ 4 files changed, 84 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/armada100/timer.c b/arch/arm/cpu/arm926ejs/armada100/timer.c index fbade4b..0cafb57 100644 --- a/arch/arm/cpu/arm926ejs/armada100/timer.c +++ b/arch/arm/cpu/arm926ejs/armada100/timer.c @@ -190,3 +190,24 @@ void reset_cpu (unsigned long ignored) while(1); } + +/* + * This function is derived from PowerPC code (read timebase as long long). + * On ARM it just returns the timer value. + */ +unsigned long long get_ticks(void) +{ + return get_timer(0); +} + +/* + * This function is derived from PowerPC code (timebase clock frequency). + * On ARM it returns the number of timer ticks per second. + */ +ulong get_tbclk (void) +{ + ulong tbclk; + + tbclk = CONFIG_SYS_HZ; + return tbclk; +} diff --git a/arch/arm/cpu/arm926ejs/kirkwood/timer.c b/arch/arm/cpu/arm926ejs/kirkwood/timer.c index a98f54c..45f4af1 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/timer.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/timer.c @@ -153,3 +153,24 @@ int timer_init(void) return 0; } + +/* + * This function is derived from PowerPC code (read timebase as long long). + * On ARM it just returns the timer value. + */ +unsigned long long get_ticks(void) +{ + return get_timer(0); +} + +/* + * This function is derived from PowerPC code (timebase clock frequency). + * On ARM it returns the number of timer ticks per second. + */ +ulong get_tbclk (void) +{ + ulong tbclk; + + tbclk = CONFIG_SYS_HZ; + return tbclk; +} diff --git a/arch/arm/cpu/arm926ejs/orion5x/timer.c b/arch/arm/cpu/arm926ejs/orion5x/timer.c index e39ecc2..dc1211e 100644 --- a/arch/arm/cpu/arm926ejs/orion5x/timer.c +++ b/arch/arm/cpu/arm926ejs/orion5x/timer.c @@ -167,3 +167,24 @@ void timer_init_r(void) lastdec = read_timer(); timestamp = 0; } + +/* + * This function is derived from PowerPC code (read timebase as long long). + * On ARM it just returns the timer value. + */ +unsigned long long get_ticks(void) +{ + return get_timer(0); +} + +/* + * This function is derived from PowerPC code (timebase clock frequency). + * On ARM it returns the number of timer ticks per second. + */ +ulong get_tbclk (void) +{ + ulong tbclk; + + tbclk = CONFIG_SYS_HZ; + return tbclk; +} diff --git a/arch/arm/cpu/arm926ejs/pantheon/timer.c b/arch/arm/cpu/arm926ejs/pantheon/timer.c index 17045b1..65966b8 100644 --- a/arch/arm/cpu/arm926ejs/pantheon/timer.c +++ b/arch/arm/cpu/arm926ejs/pantheon/timer.c @@ -197,3 +197,24 @@ void reset_cpu (unsigned long ignored) /*enable functional WDT clock */ writel(APBC_APBCLK | APBC_FNCLK, &mpmu->wdtpcr); } + +/* + * This function is derived from PowerPC code (read timebase as long long). + * On ARM it just returns the timer value. + */ +unsigned long long get_ticks(void) +{ + return get_timer(0); +} + +/* + * This function is derived from PowerPC code (timebase clock frequency). + * On ARM it returns the number of timer ticks per second. + */ +ulong get_tbclk (void) +{ + ulong tbclk; + + tbclk = CONFIG_SYS_HZ; + return tbclk; +}