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