From patchwork Fri Nov 16 21:19:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 199763 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 BC5E02C0085 for ; Sat, 17 Nov 2012 08:34:00 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C0D324A1CA; Fri, 16 Nov 2012 22:33:21 +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 9Q0ZSqK9hdoK; Fri, 16 Nov 2012 22:33:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37A094A20B; Fri, 16 Nov 2012 22:30:34 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 03AA04A19E for ; Fri, 16 Nov 2012 22:29:20 +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 UdwBToZtclAk for ; Fri, 16 Nov 2012 22:29:19 +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 mail-ye0-f202.google.com (mail-ye0-f202.google.com [209.85.213.202]) by theia.denx.de (Postfix) with ESMTPS id 05E354A1A2 for ; Fri, 16 Nov 2012 22:28:49 +0100 (CET) Received: by mail-ye0-f202.google.com with SMTP id r11so352395yen.3 for ; Fri, 16 Nov 2012 13:28:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=0AhAy3QRhH42ZmV6r9zVsi1J1E77rqEkKbYlqw18v6g=; b=lmklUISbt/iKVQB/qzTJHUCNbdapTnZN4/8fKLdMp75Qp7qlShjS9UPI0Np71LDJZ+ k/9iEfpW/HTTzzk62AV8bM7sSkPd3MT27aoLqxfV7JsNw6cFiiVMZ6zONn3WtL7yv1p5 ay/zAmtvthpjBjxri/5gDKxAYZf6BnDIFEoKV6UPuPzuUdRNlsmVLFZA2Tgo6Kheuu3P +79PNmv8WQAzd/lgmyVjuxGrU5bT7RAvpra5B7Rgsxh2ViWHEZc7kEcoFyVj9jWiVXPs 2AS3ufDwZ1geirCEWjELxgl7OqOZCYkN2IkdeeA+a2+GbO6UbcFGwFen2Jd3Hpftw4WQ fr7A== Received: by 10.236.81.107 with SMTP id l71mr4190383yhe.18.1353101328707; Fri, 16 Nov 2012 13:28:48 -0800 (PST) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id b7si212577yhj.1.2012.11.16.13.28.48 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 16 Nov 2012 13:28:48 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 8B91710004A; Fri, 16 Nov 2012 13:28:48 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 0D209160CF8; Fri, 16 Nov 2012 13:28:48 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Fri, 16 Nov 2012 13:19:53 -0800 Message-Id: <1353100842-20126-9-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1353100842-20126-1-git-send-email-sjg@chromium.org> References: <1353100842-20126-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQng/1A2mS3VS5JO7ym+1u3wZks9XWmDYzj6n9zZBJ2X1WZgjOW5ASyP0ej3p8+dDsDsFgHNlz96XQaXP5UT2R2a5f2VwvPngRou2rW7ArH2Q9SSLxk7NodwNZrjnLqHABIo9zwYyX7WIH5TOZ2N1VzWGLXZwPBcdwFQSnKYTImB+Yb3stTow3oQKFaofUdirM7r96xt Cc: Tom Rini Subject: [U-Boot] [PATCH 08/57] ixp: Move timestamp to arch_global_data 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 Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass Acked-by: Marek Vasut --- arch/arm/cpu/ixp/timer.c | 8 ++++---- arch/arm/include/asm/global_data.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/cpu/ixp/timer.c b/arch/arm/cpu/ixp/timer.c index 0450b51..663d989 100644 --- a/arch/arm/cpu/ixp/timer.c +++ b/arch/arm/cpu/ixp/timer.c @@ -70,14 +70,14 @@ unsigned long long get_ticks(void) if (readl(IXP425_OSST) & IXP425_OSST_TIMER_TS_PEND) { /* rollover of timestamp timer register */ - gd->timestamp += (0xFFFFFFFF - gd->arch.lastinc) + now + 1; + gd->arch.timestamp += (0xFFFFFFFF - gd->arch.lastinc) + now + 1; writel(IXP425_OSST_TIMER_TS_PEND, IXP425_OSST); } else { /* move stamp forward with absolut diff ticks */ - gd->timestamp += (now - gd->arch.lastinc); + gd->arch.timestamp += (now - gd->arch.lastinc); } gd->arch.lastinc = now; - return gd->timestamp; + return gd->arch.timestamp; } @@ -86,7 +86,7 @@ void reset_timer_masked(void) /* capture current timestamp counter */ gd->arch.lastinc = readl(IXP425_OSTS_B); /* start "advancing" time stamp from 0 */ - gd->timestamp = 0; + gd->arch.timestamp = 0; } ulong get_timer_masked(void) diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 95e23e1..35d07d0 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -41,6 +41,9 @@ struct arch_global_data { unsigned long tbl; unsigned long lastinc; unsigned long long timer_reset_value; +#ifdef CONFIG_IXP425 + unsigned long timestamp; +#endif }; /* @@ -65,9 +68,6 @@ typedef struct global_data { #ifdef CONFIG_FSL_ESDHC unsigned long sdhc_clk; #endif -#ifdef CONFIG_IXP425 - unsigned long timestamp; -#endif unsigned long relocaddr; /* Start address of U-Boot in RAM */ phys_size_t ram_size; /* RAM size */ unsigned long mon_len; /* monitor len */