1.1 --- a/stage2/board.h Tue Jun 23 23:05:00 2015 +0200
1.2 +++ b/stage2/board.h Tue Jun 23 23:08:19 2015 +0200
1.3 @@ -6,17 +6,18 @@
1.4 void udelay(unsigned long usec);
1.5 unsigned long get_memory_size(void);
1.6
1.7 +#define TIMER_HZ CONFIG_SYS_HZ
1.8 +#define TIMER_CHAN 0
1.9 +#define TIMER_FDATA 0xffff /* timer full data value, limited to 16 bits */
1.10 +
1.11 #ifdef CONFIG_CPU_JZ4730
1.12 #include "jz4730.h"
1.13 -#define READ_TIMER __ost_get_count(TIMER_CHAN) /* macro to read the 32 bit timer */
1.14 -#define TIMER_FDATA 0xffffffff /* timer full data value */
1.15 +#define READ_TIMER __ost_get_count(TIMER_CHAN) /* macro to read the 32 bit timer */
1.16 +#define TIMER_CHAN_IRQ IRQ_OST0
1.17 #else
1.18 #include "jz4740.h"
1.19 -#define READ_TIMER REG_TCU_TCNT(TIMER_CHAN) /* macro to read the 16 bit timer */
1.20 -#define TIMER_FDATA 0xffff /* timer full data value */
1.21 +#define READ_TIMER REG_TCU_TCNT(TIMER_CHAN) /* macro to read the 16 bit timer */
1.22 +#define TIMER_CHAN_IRQ IRQ_TCU0
1.23 #endif
1.24
1.25 -#define TIMER_HZ CONFIG_SYS_HZ
1.26 -#define TIMER_CHAN 0
1.27 -
1.28 #endif /* __BOARD_H__ */