@ -26,7 +26,7 @@
# undef SYSTIMER_BASE
# undef SYSTIMER_BASE
# define SYSTIMER_BASE 0xFFF34000 /* Timer 0 and 1 base */
# define SYSTIMER_BASE 0xFFF34000 /* Timer 0 and 1 base */
# define SYSTIMER_RATE 150000000
# define SYSTIMER_RATE ( 150000000 / 256)
static ulong timestamp ;
static ulong timestamp ;
static ulong lastinc ;
static ulong lastinc ;
@ -40,9 +40,11 @@ int timer_init(void)
/*
/*
* Setup timer0
* Setup timer0
*/
*/
writel ( 0 , & systimer_base - > timer0control ) ;
writel ( SYSTIMER_RELOAD , & systimer_base - > timer0load ) ;
writel ( SYSTIMER_RELOAD , & systimer_base - > timer0load ) ;
writel ( SYSTIMER_RELOAD , & systimer_base - > timer0value ) ;
writel ( SYSTIMER_RELOAD , & systimer_base - > timer0value ) ;
writel ( SYSTIMER_EN | SYSTIMER_32BIT , & systimer_base - > timer0control ) ;
writel ( SYSTIMER_EN | SYSTIMER_32BIT | SYSTIMER_PRESC_256 ,
& systimer_base - > timer0control ) ;
reset_timer_masked ( ) ;
reset_timer_masked ( ) ;