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