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.
25 lines
514 B
25 lines
514 B
12 years ago
|
/*
|
||
|
* Copyright (C) 2012 Altera Corporation <www.altera.com>
|
||
|
*
|
||
11 years ago
|
* SPDX-License-Identifier: GPL-2.0+
|
||
12 years ago
|
*/
|
||
|
|
||
|
#include <common.h>
|
||
|
#include <asm/io.h>
|
||
|
#include <asm/arch/timer.h>
|
||
|
|
||
10 years ago
|
#define TIMER_LOAD_VAL 0xFFFFFFFF
|
||
|
|
||
12 years ago
|
static const struct socfpga_timer *timer_base = (void *)CONFIG_SYS_TIMERBASE;
|
||
|
|
||
|
/*
|
||
|
* Timer initialization
|
||
|
*/
|
||
|
int timer_init(void)
|
||
|
{
|
||
|
writel(TIMER_LOAD_VAL, &timer_base->load_val);
|
||
|
writel(TIMER_LOAD_VAL, &timer_base->curr_val);
|
||
|
writel(readl(&timer_base->ctrl) | 0x3, &timer_base->ctrl);
|
||
|
return 0;
|
||
|
}
|