From patchwork Fri Nov 16 21:20:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 199767 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 CCE782C0094 for ; Sat, 17 Nov 2012 08:34:40 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B1F614A37B; Fri, 16 Nov 2012 22:33:50 +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 PLBx73hZwyIr; Fri, 16 Nov 2012 22:33:50 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0CD654A222; Fri, 16 Nov 2012 22:30:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 35D934A17C for ; Fri, 16 Nov 2012 22:29:23 +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 TNLmxxvHI2AD for ; Fri, 16 Nov 2012 22:29:22 +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-gh0-f202.google.com (mail-gh0-f202.google.com [209.85.160.202]) by theia.denx.de (Postfix) with ESMTPS id 64BE84A1AE for ; Fri, 16 Nov 2012 22:28:51 +0100 (CET) Received: by mail-gh0-f202.google.com with SMTP id z10so84508ghb.3 for ; Fri, 16 Nov 2012 13:28:50 -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=/2HlfDXOdmy9rdue6epLF5TZXUstqUyU0tJ+6vEKnW8=; b=ZXdxlMOkr8d1b1YJ9H99sHrVUPmYkeUNChq7bqeCkZ83BHZC6z2FyuSKFjTQoWwYqO uxu5vbLBvAmCrl7L2rjekOMRDxnlsN22UX9KBKDoWpDryiUCtsF9MheL5IeHeSaqPsrz Bbo9sKXOmF0XP0/k5xomEWJUwCd2sNP1jVDZzt0QzQeDM10xMyFi7lmPz053cno89tHV NTkfl8MlBdZSqextMr13FJLQJjQ15q8o12BoMV0FeYRBZx1yHZa3ykc2z42ejfy+B407 FgSbjcvmuX0CHHk5lZcW4BfUTA4+OfQOHjYDDuirl4mc9l2lqhL4PmX6Rs483vEd+ix7 1A/A== Received: by 10.236.144.200 with SMTP id n48mr3845139yhj.1.1353101330798; Fri, 16 Nov 2012 13:28:50 -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 i7si211073yhj.6.2012.11.16.13.28.50 (version=TLSv1/SSLv3 cipher=AES128-SHA); Fri, 16 Nov 2012 13:28:50 -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 9290410004A; Fri, 16 Nov 2012 13:28:50 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 71D7016086A; Fri, 16 Nov 2012 13:28:50 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Fri, 16 Nov 2012 13:20:18 -0800 Message-Id: <1353100842-20126-34-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: ALoCoQmdP69ttIkiUoCCgk7Op4/hgx/fzOt9HWvVb1R3TkL75jhuKd78AeJBYy/Dgzz9aRcO+qvelx/P24/R0d8nN2iVI9sQBHp4VQPSkXUlSEdyrZl9XwtfcV7be6gOFgIKfhzA33svpNUXM2Zw/SAv0vYapIYofGyndxr1+vJAABU0Ddx92B3JsfWIEV54imd34GEZQq4l Cc: Kim Phillips , Kumar Gala , Andy Fleming , Tom Rini , Stefan Roese Subject: [U-Boot] [PATCH 33/57] ppc: Move wdt_last 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 --- arch/powerpc/include/asm/global_data.h | 6 +++--- board/lwmon5/lwmon5.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 52aece0..b138e64 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -125,6 +125,9 @@ struct arch_global_data { #ifdef CONFIG_SYS_FPGA_COUNT unsigned fpga_state[CONFIG_SYS_FPGA_COUNT]; #endif +#if defined(CONFIG_WD_MAX_RATE) + unsigned long long wdt_last; /* trace watch-dog triggering rate */ +#endif }; /* @@ -173,9 +176,6 @@ typedef struct global_data { #if defined(CONFIG_LWMON) || defined(CONFIG_LWMON5) unsigned long kbd_status; #endif -#if defined(CONFIG_WD_MAX_RATE) - unsigned long long wdt_last; /* trace watch-dog triggering rate */ -#endif void **jt; /* jump table */ char env_buf[32]; /* buffer for getenv() before reloc. */ struct arch_global_data arch; /* architecture-specific data */ diff --git a/board/lwmon5/lwmon5.c b/board/lwmon5/lwmon5.c index ecd9536..29e24fb 100644 --- a/board/lwmon5/lwmon5.c +++ b/board/lwmon5/lwmon5.c @@ -357,16 +357,16 @@ void hw_watchdog_reset(void) * Don't allow watch-dog triggering more frequently than * the predefined value CONFIG_WD_MAX_RATE [ticks]. */ - if (ct >= gd->wdt_last) { - if ((ct - gd->wdt_last) < CONFIG_WD_MAX_RATE) + if (ct >= gd->arch.wdt_last) { + if ((ct - gd->arch.wdt_last) < CONFIG_WD_MAX_RATE) return; } else { /* Time base counter had been reset */ - if (((unsigned long long)(-1) - gd->wdt_last + ct) < + if (((unsigned long long)(-1) - gd->arch.wdt_last + ct) < CONFIG_WD_MAX_RATE) return; } - gd->wdt_last = get_ticks(); + gd->arch.wdt_last = get_ticks(); #endif /*