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