From patchwork Thu Jun 30 09:57:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Weisser X-Patchwork-Id: 102732 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 EAFECB6F53 for ; Thu, 30 Jun 2011 19:58:15 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3251F2815A; Thu, 30 Jun 2011 11:58:14 +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 86EZRQZSEU9G; Thu, 30 Jun 2011 11:58:14 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1437B28153; Thu, 30 Jun 2011 11:58:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 265F628128 for ; Thu, 30 Jun 2011 11:58:00 +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 uz1NIIfIuvQW for ; Thu, 30 Jun 2011 11:57:59 +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 mail-in-06.arcor-online.net (mail-in-06.arcor-online.net [151.189.21.46]) by theia.denx.de (Postfix) with ESMTPS id 339BA2811E for ; Thu, 30 Jun 2011 11:57:57 +0200 (CEST) Received: from mail-in-05-z2.arcor-online.net (mail-in-05-z2.arcor-online.net [151.189.8.17]) by mx.arcor.de (Postfix) with ESMTP id 65BAE10BDE6; Thu, 30 Jun 2011 11:57:57 +0200 (CEST) Received: from mail-in-11.arcor-online.net (mail-in-11.arcor-online.net [151.189.21.51]) by mail-in-05-z2.arcor-online.net (Postfix) with ESMTP id 5FE6D73CE9; Thu, 30 Jun 2011 11:57:57 +0200 (CEST) Received: from localhost.localdomain (unknown [212.87.136.142]) (Authenticated sender: weisserm@arcor.de) by mail-in-11.arcor-online.net (Postfix) with ESMTPA id CC12A35A5E8; Thu, 30 Jun 2011 11:57:56 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-11.arcor-online.net CC12A35A5E8 From: Matthias Weisser To: u-boot@lists.denx.de Date: Thu, 30 Jun 2011 11:57:41 +0200 Message-Id: <1309427865-17531-2-git-send-email-weisserm@arcor.de> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1309427865-17531-1-git-send-email-weisserm@arcor.de> References: <1309427865-17531-1-git-send-email-weisserm@arcor.de> Subject: [U-Boot] [PATCH 1/5] imx: Add get_tbclk() function for imx25 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 Need this function for autoboot keyd Signed-off-by: Matthias Weisser --- arch/arm/cpu/arm926ejs/mx25/timer.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx25/timer.c b/arch/arm/cpu/arm926ejs/mx25/timer.c index 14f0c2d..7c8a71b 100644 --- a/arch/arm/cpu/arm926ejs/mx25/timer.c +++ b/arch/arm/cpu/arm926ejs/mx25/timer.c @@ -187,3 +187,15 @@ void __udelay (unsigned long usec) while (get_ticks() < tmp) /* loop till event */ /*NOP*/; } + +/* + * 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_MX25_CLK32; + return tbclk; +}