]> git.sur5r.net Git - u-boot/commitdiff
ppc: Move wdt_last to arch_global_data
authorSimon Glass <sjg@chromium.org>
Thu, 13 Dec 2012 20:49:03 +0000 (20:49 +0000)
committerTom Rini <trini@ti.com>
Mon, 4 Feb 2013 14:05:44 +0000 (09:05 -0500)
Move this field into arch_global_data and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/powerpc/include/asm/global_data.h
board/lwmon5/lwmon5.c

index 52aece012c014391f042b4293a321b62f8c693e2..b138e6460b9898dee1edcfee8dfb491c8b1e47b7 100644 (file)
@@ -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
 };
 
 /*
@@ -172,9 +175,6 @@ typedef     struct  global_data {
 #endif
 #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. */
index ecd9536145a63dfce56308a2a22e8b555ed4deea..29e24fb26fe98769ddf7aa114cf632248bf8feb6 100644 (file)
@@ -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
 
        /*