1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright 2010-2011 Calxeda, Inc.
5 * Based on arm926ejs/mx27/timer.c
10 #include <asm/arch-armv7/systimer.h>
13 #define SYSTIMER_BASE 0xFFF34000 /* Timer 0 and 1 base */
15 static struct systimer *systimer_base = (struct systimer *)SYSTIMER_BASE;
25 writel(0, &systimer_base->timer0control);
26 writel(SYSTIMER_RELOAD, &systimer_base->timer0load);
27 writel(SYSTIMER_RELOAD, &systimer_base->timer0value);
28 writel(SYSTIMER_EN | SYSTIMER_32BIT | SYSTIMER_PRESC_256,
29 &systimer_base->timer0control);