microblaze: timer: Prepare for device-tree initialization
Fix CONFIG_SYS_HZ usage in board config. Do not use hardcoded value. Use CONFIG_SYS_HZ instead. Separate static configuration to single block. Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
@@ -115,19 +115,11 @@
|
||||
#endif
|
||||
|
||||
/* timer */
|
||||
#ifdef XILINX_TIMER_BASEADDR
|
||||
# if (XILINX_TIMER_IRQ != -1)
|
||||
# define CONFIG_SYS_TIMER_0 1
|
||||
#if defined(XILINX_TIMER_BASEADDR) && defined(XILINX_TIMER_IRQ)
|
||||
# define CONFIG_SYS_TIMER_0_ADDR XILINX_TIMER_BASEADDR
|
||||
# define CONFIG_SYS_TIMER_0_IRQ XILINX_TIMER_IRQ
|
||||
# define FREQUENCE XILINX_CLOCK_FREQ
|
||||
# define CONFIG_SYS_TIMER_0_PRELOAD ( FREQUENCE/1000 )
|
||||
# endif
|
||||
#elif XILINX_CLOCK_FREQ
|
||||
# define CONFIG_XILINX_CLOCK_FREQ XILINX_CLOCK_FREQ
|
||||
#else
|
||||
# error BAD CLOCK FREQ
|
||||
#endif
|
||||
|
||||
/* FSL */
|
||||
/* #define CONFIG_SYS_FSL_2 */
|
||||
/* #define FSL_INTR_2 1 */
|
||||
|
Reference in New Issue
Block a user