]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ixp: Move timestamp to arch_global_data
authorSimon Glass <sjg@chromium.org>
Thu, 13 Dec 2012 20:48:37 +0000 (20:48 +0000)
committerTom Rini <trini@ti.com>
Fri, 1 Feb 2013 20:07:50 +0000 (15:07 -0500)
Move this field into arch_global_data and tidy up.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/arm/cpu/ixp/timer.c
arch/arm/include/asm/global_data.h

index 0450b51031fecd8222dd80f35c37dc62061b8224..663d9890899603b47b52a41d3139b312b5ad96d8 100644 (file)
@@ -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)
index ea27c16d1d07573d7f7a95addfb1fd6fa950887b..5d414efaac1e6d743c4a6bfaf04fb34973f08ed6 100644 (file)
@@ -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
 };
 
 /*
@@ -64,9 +67,6 @@ typedef       struct  global_data {
        unsigned long   fb_base;        /* base address of frame buffer */
 #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 */