| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
#include <arch_helpers.h> |
| 7 |
#include <common/debug.h> |
| 8 |
#include <lib/mmio.h> |
| 9 |
#include <mcucfg.h> |
| 10 |
#include <mt_timer.h> |
| 11 |
#include <platform_def.h> |
| 12 |
|
| 13 |
static void enable_systimer_compensation(void) |
| 14 |
{ |
| 15 |
unsigned int reg; |
| 16 |
|
| 17 |
reg = mmio_read_32(CNTCR_REG); |
| 18 |
reg &= ~COMP_15_EN; |
| 19 |
reg |= COMP_20_EN; |
| 20 |
mmio_write_32(CNTCR_REG, reg); |
| 21 |
|
| 22 |
NOTICE("[systimer] CNTCR_REG(0x%x)\n", mmio_read_32(CNTCR_REG)); |
| 23 |
} |
| 24 |
|
| 25 |
void mt_systimer_init(void) |
| 26 |
{ |
| 27 |
|
| 28 |
enable_systimer_compensation(); |
| 29 |
} |