1 #ifndef __BOARD_H__ 2 #define __BOARD_H__ 3 4 /* Utility functions. */ 5 6 void udelay(unsigned long); 7 unsigned long get_memory_size(); 8 9 /* Common timer definitions. */ 10 11 #define TIMER_HZ CONFIG_SYS_HZ 12 #define TIMER_CHAN 0 13 #define TIMER_FDATA 0xffff /* timer full data value, limited to 16 bits */ 14 15 /* Select the CPU definitions according to the configuration. */ 16 17 #ifdef CONFIG_CPU_JZ4730 18 19 #include "jz4730.h" 20 #include "jz4730_compat.h" 21 #define READ_TIMER __ost_get_count(TIMER_CHAN) /* macro to read the 32 bit timer */ 22 #define TIMER_CHAN_IRQ IRQ_OST0 23 24 #else /* assume jz4740 */ 25 26 #include "jz4740.h" 27 #define READ_TIMER REG_TCU_TCNT(TIMER_CHAN) /* macro to read the 16 bit timer */ 28 #define TIMER_CHAN_IRQ IRQ_TCU0 29 30 #endif /* CONFIG_CPU_JZ4730 */ 31 32 /* Select the board definitions according to the configuration. */ 33 34 #ifdef CONFIG_CPU_JZ4730_MINIPC 35 36 #include "minipc.h" 37 38 #else /* assume NanoNote */ 39 40 #include "nanonote.h" 41 42 #endif /* CONFIG_CPU_JZ4730_MINIPC */ 43 44 #endif /* __BOARD_H__ */