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