Patchwork [U-Boot,v2,34/58] ppc: Move wdt_last to arch_global_data

login
register
mail settings
Submitter Simon Glass
Date Dec. 14, 2012, 6:49 a.m.
Message ID <1355467767-29575-35-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/206336/
State Accepted, archived
Delegated to: Tom Rini
Headers show

Comments

Simon Glass - Dec. 14, 2012, 6:49 a.m.
Move this field into arch_global_data and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2: None

 arch/powerpc/include/asm/global_data.h |    6 +++---
 board/lwmon5/lwmon5.c                  |    8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

Patch

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
 
 	/*