upstream u-boot with additional patches for our devices/boards:
https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ;
Gbit ethernet patch for some LIME2 revisions ;
with SPI flash support
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
692 B
35 lines
692 B
13 years ago
|
/*
|
||
|
* Copyright 2010-2011 Calxeda, Inc.
|
||
|
*
|
||
|
* Based on arm926ejs/mx27/timer.c
|
||
|
*
|
||
12 years ago
|
* SPDX-License-Identifier: GPL-2.0+
|
||
13 years ago
|
*/
|
||
|
|
||
|
#include <common.h>
|
||
|
#include <asm/io.h>
|
||
|
#include <asm/arch-armv7/systimer.h>
|
||
|
|
||
|
#undef SYSTIMER_BASE
|
||
|
#define SYSTIMER_BASE 0xFFF34000 /* Timer 0 and 1 base */
|
||
|
|
||
|
static struct systimer *systimer_base = (struct systimer *)SYSTIMER_BASE;
|
||
|
|
||
|
/*
|
||
|
* Start the timer
|
||
|
*/
|
||
|
int timer_init(void)
|
||
|
{
|
||
|
/*
|
||
|
* Setup timer0
|
||
|
*/
|
||
12 years ago
|
writel(0, &systimer_base->timer0control);
|
||
13 years ago
|
writel(SYSTIMER_RELOAD, &systimer_base->timer0load);
|
||
|
writel(SYSTIMER_RELOAD, &systimer_base->timer0value);
|
||
12 years ago
|
writel(SYSTIMER_EN | SYSTIMER_32BIT | SYSTIMER_PRESC_256,
|
||
|
&systimer_base->timer0control);
|
||
13 years ago
|
|
||
|
return 0;
|
||
|
|
||
|
}
|