]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
nios2: Set CONFIG_SYS_HZ to 1000 all nios2 boards.
authorScott McNutt <smcnutt@psyent.com>
Wed, 31 Mar 2010 00:23:04 +0000 (20:23 -0400)
committerScott McNutt <smcnutt@psyent.com>
Fri, 2 Apr 2010 16:28:41 +0000 (12:28 -0400)
   CONFIG_SYS_HZ was being calculated (incorrectly) in nios2 configuration
   headers. Updated comments to accurately describe timebase macros.

Signed-off-by: Scott McNutt <smcnutt@psyent.com>
include/configs/EP1C20.h
include/configs/EP1S10.h
include/configs/EP1S40.h
include/configs/PCI5441.h
include/configs/PK1C20.h

index dc82e54e8ac41bdc8fb9dc361daec24140d1523a..3920d35264aeea7fe507e84aae683fd3234363ff 100644 (file)
  * TIMEBASE --
  *
  * The high res timer defaults to 1 msec. Since it includes the period
- * registers, we can slow it down to 10 msec using TMRCNT. If the default
- * period is acceptable, TMRCNT can be left undefined.
+ * registers, the interrupt frequency can be reduced using TMRCNT.
+ * If the default period is acceptable, TMRCNT can be left undefined.
+ * TMRMS represents the desired mecs per tick (msecs per interrupt).
  *----------------------------------------------------------------------*/
+#define CONFIG_SYS_HZ                  1000    /* Always 1000 */
 #define CONFIG_SYS_NIOS_TMRBASE        0x02120820      /* Tick timer base addr */
-#define CONFIG_SYS_NIOS_TMRIRQ         3               /* Timer IRQ num        */
-#define CONFIG_SYS_NIOS_TMRMS          10              /* 10 msec per tick     */
-#define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
-#define CONFIG_SYS_HZ          (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
+#define CONFIG_SYS_NIOS_TMRIRQ         3       /* Timer IRQ num        */
+#define CONFIG_SYS_NIOS_TMRMS          10      /* Desired period (msec)*/
+#define CONFIG_SYS_NIOS_TMRCNT \
+               (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 
 /*------------------------------------------------------------------------
  * STATUS LED -- Provides a simple blinking led. For Nios2 each board
index 498f26df1fc49132e5ca433ba4dad5ea68b84628..bfbf8c1119775a45c41497f29ee6aee4a48cb6b5 100644 (file)
  * TIMEBASE --
  *
  * The high res timer defaults to 1 msec. Since it includes the period
- * registers, we can slow it down to 10 msec using TMRCNT. If the default
- * period is acceptable, TMRCNT can be left undefined.
+ * registers, the interrupt frequency can be reduced using TMRCNT.
+ * If the default period is acceptable, TMRCNT can be left undefined.
+ * TMRMS represents the desired mecs per tick (msecs per interrupt).
  *----------------------------------------------------------------------*/
+#define CONFIG_SYS_HZ                  1000    /* Always 1000 */
 #define CONFIG_SYS_NIOS_TMRBASE        0x02120820      /* Tick timer base addr */
-#define CONFIG_SYS_NIOS_TMRIRQ         3               /* Timer IRQ num        */
-#define CONFIG_SYS_NIOS_TMRMS          10              /* 10 msec per tick     */
-#define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
-#define CONFIG_SYS_HZ          (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
+#define CONFIG_SYS_NIOS_TMRIRQ         3       /* Timer IRQ num */
+#define CONFIG_SYS_NIOS_TMRMS          10      /* Desired period (msec)*/
+#define CONFIG_SYS_NIOS_TMRCNT \
+               (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 
 /*------------------------------------------------------------------------
  * STATUS LED -- Provides a simple blinking led. For Nios2 each board
index 4ad65d84accf2d175a4b11f92132adfb05b3a9da..4d905fee385e5b77f0d0b4a32af50f462bcf40d1 100644 (file)
  * TIMEBASE --
  *
  * The high res timer defaults to 1 msec. Since it includes the period
- * registers, we can slow it down to 10 msec using TMRCNT. If the default
- * period is acceptable, TMRCNT can be left undefined.
+ * registers, the interrupt frequency can be reduced using TMRCNT.
+ * If the default period is acceptable, TMRCNT can be left undefined.
+ * TMRMS represents the desired mecs per tick (msecs per interrupt).
  *----------------------------------------------------------------------*/
+#define CONFIG_SYS_HZ                  1000    /* Always 1000 */
 #define CONFIG_SYS_NIOS_TMRBASE        0x02120820      /* Tick timer base addr */
-#define CONFIG_SYS_NIOS_TMRIRQ         3               /* Timer IRQ num        */
-#define CONFIG_SYS_NIOS_TMRMS          10              /* 10 msec per tick     */
-#define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
-#define CONFIG_SYS_HZ          (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
+#define CONFIG_SYS_NIOS_TMRIRQ         3       /* Timer IRQ num */
+#define CONFIG_SYS_NIOS_TMRMS          10      /* Desired period (msec) */
+#define CONFIG_SYS_NIOS_TMRCNT \
+               (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 
 /*------------------------------------------------------------------------
  * STATUS LED -- Provides a simple blinking led. For Nios2 each board
index d06b7f8274903cf966540bd5009b65b81a7c5f56..c60a9f7bc722adf43f18e24a7bd4a3f63a36afe8 100644 (file)
  * TIMEBASE --
  *
  * The high res timer defaults to 1 msec. Since it includes the period
- * registers, we can slow it down to 10 msec using TMRCNT. If the default
- * period is acceptable, TMRCNT can be left undefined.
+ * registers, the interrupt frequency can be reduced using TMRCNT.
+ * If the default period is acceptable, TMRCNT can be left undefined.
+ * TMRMS represents the desired mecs per tick (msecs per interrupt).
  *----------------------------------------------------------------------*/
+#define CONFIG_SYS_HZ                  1000    /* Always 1000 */
 #define CONFIG_SYS_NIOS_TMRBASE        0x00920860      /* Tick timer base addr */
-#define CONFIG_SYS_NIOS_TMRIRQ         3               /* Timer IRQ num        */
-#define CONFIG_SYS_NIOS_TMRMS          10              /* 10 msec per tick     */
-#define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
-#define        CONFIG_SYS_HZ           (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
+#define CONFIG_SYS_NIOS_TMRIRQ         3       /* Timer IRQ num */
+#define CONFIG_SYS_NIOS_TMRMS          10      /* Desired period (msec)*/
+#define CONFIG_SYS_NIOS_TMRCNT \
+               (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 
 
 /*
index 165dde043e6429d03af07a8a9384f89e9dd2b54f..874c20b935c36c206494478bea52966dcc18ecc9 100644 (file)
  * TIMEBASE --
  *
  * The high res timer defaults to 1 msec. Since it includes the period
- * registers, we can slow it down to 10 msec using TMRCNT. If the default
- * period is acceptable, TMRCNT can be left undefined.
+ * registers, the interrupt frequency can be reduced using TMRCNT.
+ * If the default period is acceptable, TMRCNT can be left undefined.
+ * TMRMS represents the desired mecs per tick (msecs per interrupt).
  *----------------------------------------------------------------------*/
+#define CONFIG_SYS_HZ                  1000    /* Always 1000 */
 #define CONFIG_SYS_NIOS_TMRBASE        0x02120820      /* Tick timer base addr */
-#define CONFIG_SYS_NIOS_TMRIRQ         3               /* Timer IRQ num        */
-#define CONFIG_SYS_NIOS_TMRMS          10              /* 10 msec per tick     */
-#define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
-#define CONFIG_SYS_HZ          (CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
+#define CONFIG_SYS_NIOS_TMRIRQ         3       /* Timer IRQ num */
+#define CONFIG_SYS_NIOS_TMRMS          10      /* Desired period */
+#define CONFIG_SYS_NIOS_TMRCNT \
+               (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 
 /*------------------------------------------------------------------------
  * STATUS LED -- Provides a simple blinking led. For Nios2 each board