mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-22 18:09:03 +09:00
![Masahiro Yamada](/assets/img/avatar_default.png)
Move arch/arm/cpu/armv7/highbank/* -> arch/arm/mach-highbank/* Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Rob Herring <robh@kernel.org>
35 lines
692 B
C
35 lines
692 B
C
/*
|
|
* Copyright 2010-2011 Calxeda, Inc.
|
|
*
|
|
* Based on arm926ejs/mx27/timer.c
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#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
|
|
*/
|
|
writel(0, &systimer_base->timer0control);
|
|
writel(SYSTIMER_RELOAD, &systimer_base->timer0load);
|
|
writel(SYSTIMER_RELOAD, &systimer_base->timer0value);
|
|
writel(SYSTIMER_EN | SYSTIMER_32BIT | SYSTIMER_PRESC_256,
|
|
&systimer_base->timer0control);
|
|
|
|
return 0;
|
|
|
|
}
|