1 #ifndef __BOARD_H__ 2 #define __BOARD_H__ 3 4 /* Utility functions. */ 5 6 void udelay(unsigned long usec); 7 unsigned long get_memory_size(void); 8 9 #ifdef CONFIG_CPU_JZ4730 10 #include "jz4730.h" 11 #define READ_TIMER __ost_get_count(TIMER_CHAN) /* macro to read the 32 bit timer */ 12 #define TIMER_FDATA 0xffffffff /* timer full data value */ 13 #else 14 #include "jz4740.h" 15 #define READ_TIMER REG_TCU_TCNT(TIMER_CHAN) /* macro to read the 16 bit timer */ 16 #define TIMER_FDATA 0xffff /* timer full data value */ 17 #endif 18 19 #define TIMER_HZ CONFIG_SYS_HZ 20 #define TIMER_CHAN 0 21 22 #endif /* __BOARD_H__ */