2 * Copyright (C) 2012 Altera Corporation <www.altera.com>
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <asm/arch/timer.h>
11 static const struct socfpga_timer *timer_base = (void *)CONFIG_SYS_TIMERBASE;
14 * Timer initialization
18 writel(TIMER_LOAD_VAL, &timer_base->load_val);
19 writel(TIMER_LOAD_VAL, &timer_base->curr_val);
20 writel(readl(&timer_base->ctrl) | 0x3, &timer_base->ctrl);