nios2: Set CONFIG_SYS_HZ to 1000 all nios2 boards.
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>
This commit is contained in:
		
							parent
							
								
									3ea0037f23
								
							
						
					
					
						commit
						3a89a91a10
					
				| 
						 | 
					@ -124,14 +124,16 @@
 | 
				
			||||||
 * TIMEBASE --
 | 
					 * TIMEBASE --
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * The high res timer defaults to 1 msec. Since it includes the period
 | 
					 * 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
 | 
					 * registers, the interrupt frequency can be reduced using TMRCNT.
 | 
				
			||||||
 * period is acceptable, TMRCNT can be left undefined.
 | 
					 * 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_TMRBASE	0x02120820	/* Tick timer base addr */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num	*/
 | 
					#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num	*/
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRMS		10		/* 10 msec per tick	*/
 | 
					#define CONFIG_SYS_NIOS_TMRMS		10	/* Desired period (msec)*/
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
					#define CONFIG_SYS_NIOS_TMRCNT \
 | 
				
			||||||
#define CONFIG_SYS_HZ		(CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
 | 
							(CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*------------------------------------------------------------------------
 | 
					/*------------------------------------------------------------------------
 | 
				
			||||||
 * STATUS LED -- Provides a simple blinking led. For Nios2 each board
 | 
					 * STATUS LED -- Provides a simple blinking led. For Nios2 each board
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -119,14 +119,16 @@
 | 
				
			||||||
 * TIMEBASE --
 | 
					 * TIMEBASE --
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * The high res timer defaults to 1 msec. Since it includes the period
 | 
					 * 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
 | 
					 * registers, the interrupt frequency can be reduced using TMRCNT.
 | 
				
			||||||
 * period is acceptable, TMRCNT can be left undefined.
 | 
					 * 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_TMRBASE	0x02120820	/* Tick timer base addr */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num */
 | 
					#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRMS		10		/* 10 msec per tick	*/
 | 
					#define CONFIG_SYS_NIOS_TMRMS		10	/* Desired period (msec)*/
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
					#define CONFIG_SYS_NIOS_TMRCNT \
 | 
				
			||||||
#define CONFIG_SYS_HZ		(CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
 | 
							(CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*------------------------------------------------------------------------
 | 
					/*------------------------------------------------------------------------
 | 
				
			||||||
 * STATUS LED -- Provides a simple blinking led. For Nios2 each board
 | 
					 * STATUS LED -- Provides a simple blinking led. For Nios2 each board
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -119,14 +119,16 @@
 | 
				
			||||||
 * TIMEBASE --
 | 
					 * TIMEBASE --
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * The high res timer defaults to 1 msec. Since it includes the period
 | 
					 * 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
 | 
					 * registers, the interrupt frequency can be reduced using TMRCNT.
 | 
				
			||||||
 * period is acceptable, TMRCNT can be left undefined.
 | 
					 * 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_TMRBASE	0x02120820	/* Tick timer base addr */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num */
 | 
					#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRMS		10		/* 10 msec per tick	*/
 | 
					#define CONFIG_SYS_NIOS_TMRMS		10	/* Desired period (msec) */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
					#define CONFIG_SYS_NIOS_TMRCNT \
 | 
				
			||||||
#define CONFIG_SYS_HZ		(CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
 | 
							(CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*------------------------------------------------------------------------
 | 
					/*------------------------------------------------------------------------
 | 
				
			||||||
 * STATUS LED -- Provides a simple blinking led. For Nios2 each board
 | 
					 * STATUS LED -- Provides a simple blinking led. For Nios2 each board
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -114,14 +114,16 @@
 | 
				
			||||||
 * TIMEBASE --
 | 
					 * TIMEBASE --
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * The high res timer defaults to 1 msec. Since it includes the period
 | 
					 * 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
 | 
					 * registers, the interrupt frequency can be reduced using TMRCNT.
 | 
				
			||||||
 * period is acceptable, TMRCNT can be left undefined.
 | 
					 * 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_TMRBASE	0x00920860	/* Tick timer base addr	*/
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num */
 | 
					#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRMS		10		/* 10 msec per tick	*/
 | 
					#define CONFIG_SYS_NIOS_TMRMS		10	/* Desired period (msec)*/
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRCNT	(CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
					#define CONFIG_SYS_NIOS_TMRCNT \
 | 
				
			||||||
#define	CONFIG_SYS_HZ		(CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
 | 
							(CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -124,14 +124,16 @@
 | 
				
			||||||
 * TIMEBASE --
 | 
					 * TIMEBASE --
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * The high res timer defaults to 1 msec. Since it includes the period
 | 
					 * 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
 | 
					 * registers, the interrupt frequency can be reduced using TMRCNT.
 | 
				
			||||||
 * period is acceptable, TMRCNT can be left undefined.
 | 
					 * 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_TMRBASE	0x02120820	/* Tick timer base addr */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num */
 | 
					#define CONFIG_SYS_NIOS_TMRIRQ		3	/* Timer IRQ num */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRMS		10		/* 10 msec per tick	*/
 | 
					#define CONFIG_SYS_NIOS_TMRMS		10	/* Desired period */
 | 
				
			||||||
#define CONFIG_SYS_NIOS_TMRCNT (CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
					#define CONFIG_SYS_NIOS_TMRCNT \
 | 
				
			||||||
#define CONFIG_SYS_HZ		(CONFIG_SYS_CLK_FREQ/(CONFIG_SYS_NIOS_TMRCNT + 1))
 | 
							(CONFIG_SYS_NIOS_TMRMS * (CONFIG_SYS_CLK_FREQ/1000))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*------------------------------------------------------------------------
 | 
					/*------------------------------------------------------------------------
 | 
				
			||||||
 * STATUS LED -- Provides a simple blinking led. For Nios2 each board
 | 
					 * STATUS LED -- Provides a simple blinking led. For Nios2 each board
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue