From patchwork Sat Feb 18 10:50:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Linz X-Patchwork-Id: 142035 X-Patchwork-Delegate: monstr@monstr.eu 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 E9792B6EEE for ; Sat, 18 Feb 2012 21:50:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9DFEB280E8; Sat, 18 Feb 2012 11:50:46 +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 CDTRe4JQ7UbZ; Sat, 18 Feb 2012 11:50:46 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 506B42810E; Sat, 18 Feb 2012 11:50:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3BE5F280E8 for ; Sat, 18 Feb 2012 11:50:41 +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 fYzXJmXhIIBT for ; Sat, 18 Feb 2012 11:50:40 +0100 (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 mo-p00-ob.rzone.de (mo-p00-ob.rzone.de [81.169.146.160]) by theia.denx.de (Postfix) with ESMTPS id 0A2FE28109 for ; Sat, 18 Feb 2012 11:50:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1329562238; l=1211; s=domk; d=li-pro.net; h=Date:Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH; bh=Gj8eZtzgaKWQoXvUfTi0M9OIlqQ=; b=V1vGpcinEjm3AWPmFMbzCXXV6AML0U5hil+8RFX5+LMvMzGrVvp9w+a2Eua37fWTyGW Fb1Sv3IrPei2AqqjqzVXVZh0om00oivwYSxTVoOLmLvjfC2JNvi4I+m85yUmp/eKFy/Hp WOK6Pk/Dg3rinf0BZA7pUAlCKFAzHmKh1UE= X-RZG-AUTH: :IGUKb2CkcrLHmZv+FHarxbxlXmJO7WRQLa+vsyW+4RLunWeioNrxL1hubc+P X-RZG-CLASS-ID: mo00 Received: from localhost.localdomain (i5882826D.versanet.de [88.130.130.109]) by smtp.strato.de (cohen mo17) (RZmta 27.6 DYNA|AUTH) with ESMTPA id w03e4co1I7bq8g ; Sat, 18 Feb 2012 11:50:24 +0100 (MET) From: Stephan Linz To: monstr@monstr.eu Date: Sat, 18 Feb 2012 11:50:18 +0100 Message-Id: <1329562218-5003-1-git-send-email-linz@li-pro.net> X-Mailer: git-send-email 1.7.0.4 Cc: Stephan Linz , u-boot@lists.denx.de Subject: [U-Boot] [PATCH] microblaze: fix build failure 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. The Microblaze generic build fails with below error common/libcommon.o: In function `cread_line': /devel/u-boot/common/main.c:717: undefined reference to `get_ticks' /devel/u-boot/common/main.c:717: undefined reference to `get_tbclk' /devel/u-boot/common/main.c:720: undefined reference to `get_ticks' Signed-off-by: Stephan Linz --- arch/microblaze/cpu/timer.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/arch/microblaze/cpu/timer.c b/arch/microblaze/cpu/timer.c index a167755..1952804 100644 --- a/arch/microblaze/cpu/timer.c +++ b/arch/microblaze/cpu/timer.c @@ -62,3 +62,21 @@ int timer_init (void) } #endif #endif + +/* + * This function is derived from PowerPC code (read timebase as long long). + * On Microblaze 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 Microblaze it returns the number of timer ticks per second. + */ +ulong get_tbclk(void) +{ + return CONFIG_SYS_HZ; +}