2015-06-23 | Paul Boddie | file changeset files shortlog | Attempted to add support for interrupts, although this does not currently work. Some handlers have been added, and minimal handlers to branch to them should be installed in the appropriate addresses utilised by the CPU. The program itself should gradually plot the test pattern but be interrupted and configured to draw clear regions periodically. | stage2-non-pic |
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@68 | 15 | #define READ_TIMER __ost_get_count(TIMER_CHAN) /* macro to read the 32 bit timer */ |
paul@68 | 16 | #define TIMER_CHAN_IRQ IRQ_OST0 |
paul@33 | 17 | #else |
paul@33 | 18 | #include "jz4740.h" |
paul@68 | 19 | #define READ_TIMER REG_TCU_TCNT(TIMER_CHAN) /* macro to read the 16 bit timer */ |
paul@68 | 20 | #define TIMER_CHAN_IRQ IRQ_TCU0 |
paul@33 | 21 | #endif |
paul@33 | 22 | |
paul@33 | 23 | #endif /* __BOARD_H__ */ |