From patchwork Mon Jun 6 07:40:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gorsulowski X-Patchwork-Id: 630676 X-Patchwork-Delegate: trini@ti.com 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 3rNRSb3gsgz9sp7 for ; Mon, 6 Jun 2016 17:40:30 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 20B054BDE9; Mon, 6 Jun 2016 09:40:26 +0200 (CEST) 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 nDkmwEwR0gfl; Mon, 6 Jun 2016 09:40:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B24854BAEA; Mon, 6 Jun 2016 09:40:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5748E4BAEA for ; Mon, 6 Jun 2016 09:40:22 +0200 (CEST) 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 pQSqxXc-P_CF for ; Mon, 6 Jun 2016 09:40:22 +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 mxuout01.htp-tel.de (mxu01.htp-tel.de [81.14.242.8]) by theia.denx.de (Postfix) with ESMTPS id 12DB34BABA for ; Mon, 6 Jun 2016 09:40:17 +0200 (CEST) Received: from mxuin01.htp-tel.de (a81-14-242-29.net-htp.de [81.14.242.29]) by mxuout01.htp-tel.de with ESMTPS id u567eDCM023192 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 6 Jun 2016 09:40:13 +0200 (CEST) Received: from esd-s3.esd.eu (a81-14-233-218.net-htp.de [81.14.233.218]) by mxuin01.htp-tel.de with ESMTPS id u567eCv3025560 (version=TLSv1 cipher=AES128-SHA bits=128 verify=NO); Mon, 6 Jun 2016 09:40:13 +0200 (CEST) Received: from debby.esd.local (10.0.0.190) by esd-s3.esd.local (10.0.0.66) with Microsoft SMTP Server id 8.2.176.0; Mon, 6 Jun 2016 09:40:11 +0200 From: Daniel Gorsulowski To: Date: Mon, 6 Jun 2016 09:40:11 +0200 Message-ID: <1465198811-44107-1-git-send-email-daniel.gorsulowski@esd.eu> X-Mailer: git-send-email 2.7.1 MIME-Version: 1.0 Cc: trini@konsulko.com, Daniel Gorsulowski , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/1] omap3: bugfix in timer on rollover X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Daniel Gorsulowski --- arch/arm/cpu/armv7/omap-common/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/omap-common/timer.c b/arch/arm/cpu/armv7/omap-common/timer.c index 032bd2c..49e3a97 100644 --- a/arch/arm/cpu/armv7/omap-common/timer.c +++ b/arch/arm/cpu/armv7/omap-common/timer.c @@ -77,7 +77,7 @@ ulong get_timer_masked(void) /* move stamp fordward with absoulte diff ticks */ gd->arch.tbl += (now - gd->arch.lastinc); } else { /* we have rollover of incrementer */ - gd->arch.tbl += ((TIMER_LOAD_VAL / (TIMER_CLOCK / + gd->arch.tbl += ((TIMER_OVERFLOW_VAL / (TIMER_CLOCK / CONFIG_SYS_HZ)) - gd->arch.lastinc) + now; } gd->arch.lastinc = now;