From patchwork Fri Dec 14 06:49:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 206336 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 91DA02C008E for ; Fri, 14 Dec 2012 18:01:03 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DCCAB4A217; Fri, 14 Dec 2012 08:00:29 +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 jgZXwI2pE7yA; Fri, 14 Dec 2012 08:00:29 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 62C644A218; Fri, 14 Dec 2012 07:55:34 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6AA784A11B for ; Fri, 14 Dec 2012 07:53:36 +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 4JqyhSU2-x7e for ; Fri, 14 Dec 2012 07:53:35 +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-vb0-f74.google.com (mail-vb0-f74.google.com [209.85.212.74]) by theia.denx.de (Postfix) with ESMTPS id 027144A159 for ; Fri, 14 Dec 2012 07:50:24 +0100 (CET) Received: by mail-vb0-f74.google.com with SMTP id s24so311451vbi.3 for ; Thu, 13 Dec 2012 22:50:22 -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=tczL0QcFC7idIKtW2+3QnpV4vfY0wk7hyGMtS5uGBy0=; b=L42OnJ/D4HvqLn/b+kw+e/VCb/aaduan1/nrPThT10Didie8CgHp8a+fzzNF4NZloI pu+rg5OcC9fyM3XR2WpX4wumNYyg+XlqWpwwQa/0RO61BTgh41LJ81I4VfM7oardUKA3 xn0e5EZ92TMew3cerE85WRU+8prdjMA8Xqfo1g4xtBBREv/y48dsqnxAcUYNWBraPhW9 j5DNti69IkV7840SnoplsC7GrR3Rc08DVGuw3aY1lKDwCmFW04XFcRt6+B5rbGY0Fvlk kTo6dG+LekLs5J/k9wvF1zVHi856qjErIXjPqzyNv7wOt6JqfU/Mo7ZIubeqZ3q8yI3h pQFw== Received: by 10.236.183.202 with SMTP id q50mr2241849yhm.29.1355467822102; Thu, 13 Dec 2012 22:50:22 -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 s78si348110yhh.3.2012.12.13.22.50.22 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 13 Dec 2012 22:50:22 -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 EAE7F100048; Thu, 13 Dec 2012 22:50:21 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id CCABA160878; Thu, 13 Dec 2012 22:50:21 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 13 Dec 2012 22:49:03 -0800 Message-Id: <1355467767-29575-35-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1355467767-29575-1-git-send-email-sjg@chromium.org> References: <1355467767-29575-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQl3wfgKrItKHFFe4Xg9t7WWAyfXM2yr9kMPW+QCqYuM3YTGKdkSstKQCSb9xMVKXvFPrFSQntCpDc9+sm4A564SMmYSWypFt4roFFdY3YxBgeKepB6axkgXJOpGFLTID3aJmuLU1G7PFwulFsCDKXojMmZmVs1sMOdTvezLgP+EuAYFOkMygvJB/ztCJPuficXd1d7T Cc: Kim Phillips , Kumar Gala , Andy Fleming , Tom Rini , Stefan Roese Subject: [U-Boot] [PATCH v2 34/58] 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 --- Changes in v2: None 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 /*