Timer: Remove reset_timer() for non-Nios2 arches

This commit is contained in:
Graeme Russ 2011-07-15 02:19:44 +00:00 committed by Wolfgang Denk
parent e110c4fe44
commit 4769be21cc
49 changed files with 9 additions and 270 deletions

View File

@ -113,11 +113,6 @@ void reset_timer_masked (void)
gd->tbl = 0; /* start "advancing" time stamp from 0 */
}
void reset_timer(void)
{
reset_timer_masked();
}
unsigned long long get_ticks (void)
{
ulong now = GPTCNT; /* current tick value */

View File

@ -73,11 +73,6 @@ inline ulong get_timer_masked(void)
return val;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
ulong tmp;

View File

@ -57,11 +57,6 @@ int timer_init (void)
/*
* timer without interrupts
*/
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked () - base;

View File

@ -142,11 +142,6 @@ void reset_timer_masked(void)
timestamp = 0;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer_masked(void)
{
unsigned long long res = get_ticks();

View File

@ -60,15 +60,6 @@ int timer_init(void)
return 0;
}
void reset_timer(void)
{
lastinc = timestamp = 0;
__raw_writel(0, &regs->tcr);
__raw_writel(0, &regs->tim34);
__raw_writel(2 << 22, &regs->tcr);
}
static ulong get_timer_raw(void)
{
ulong now = __raw_readl(&regs->tim34);

View File

@ -209,11 +209,6 @@ int timer_init (void)
#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || defined(CONFIG_NETARM) || defined(CONFIG_ARMADILLO) || defined(CONFIG_LPC2292)
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked () - base;

View File

@ -81,12 +81,6 @@ void reset_timer_masked(void)
debug("%s(): lastdec = %lx\n", __func__, lastdec);
}
void reset_timer(void)
{
debug("%s()\n", __func__);
reset_timer_masked();
}
/*
* return timer ticks
*/

View File

@ -72,12 +72,6 @@ int timer_init(void)
/*
* timer without interrupts
*/
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return get_timer_masked() - base;

View File

@ -71,12 +71,6 @@ int timer_init (void)
/*
* timer without interrupts
*/
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked () - base;

View File

@ -97,11 +97,6 @@ void reset_timer_masked(void)
timer.ticks = 0;
}
void reset_timer(void)
{
reset_timer_masked();
}
void __udelay(unsigned long usec)
{
unsigned long long target;

View File

@ -51,12 +51,6 @@ int timer_init (void)
/*
* timer without interrupts
*/
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked() - base;

View File

@ -33,7 +33,7 @@ ulong timer_ticks;
int timer_init (void)
{
reset_timer();
reset_timer_masked();
return 0;
}
@ -55,11 +55,6 @@ void reset_timer_masked(void)
timer_ticks = 0;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer_masked(void)
{
/* Check for timer wrap */

View File

@ -83,12 +83,6 @@ int timer_init(void)
/*
* timer without interrupts
*/
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return get_timer_masked() - base;

View File

@ -64,12 +64,6 @@ int timer_init (void)
/*
* timer without interrupts
*/
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked () - base;

View File

@ -100,11 +100,6 @@ ulong get_timer_masked(void)
return gd->tbu;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return ((get_timer_masked() / (CONFIG_SYS_HZ_CLOCK / 1000)) -

View File

@ -78,11 +78,6 @@ int timer_init(void)
return(0);
}
void reset_timer(void)
{
gd->timer_reset_value = get_ticks();
}
/*
* Get the current 64 bit timer tick count
*/

View File

@ -112,11 +112,6 @@ ulong get_timer_masked(void)
return timestamp;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return get_timer_masked() - base;

View File

@ -121,11 +121,6 @@ void __udelay(unsigned long usec)
/*NOP*/;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return get_timer_masked() - base;

View File

@ -130,11 +130,6 @@ void reset_timer_masked(void)
timestamp = 0; /* start "advancing" time stamp from 0 */
}
void reset_timer(void)
{
reset_timer_masked();
}
unsigned long long get_ticks (void)
{
struct gpt_regs *gpt = (struct gpt_regs *)IMX_GPT1_BASE;

View File

@ -133,11 +133,6 @@ void reset_timer_masked(void)
timestamp = 0; /* start "advancing" time stamp from 0 */
}
void reset_timer(void)
{
reset_timer_masked();
}
unsigned long long get_ticks (void)
{
struct gpt_regs *regs = (struct gpt_regs *)IMX_TIM1_BASE;

View File

@ -40,16 +40,12 @@
/* Configure a free-running, auto-wrap counter with no prescaler */
int timer_init(void)
{
ulong val;
writel(MTU_CRn_ENA | MTU_CRn_PRESCALE_1 | MTU_CRn_32BITS,
CONFIG_SYS_TIMERBASE + MTU_CR(0));
reset_timer();
return 0;
}
/* Restart counting from 0 */
void reset_timer(void)
{
ulong val;
/* Reset the timer */
writel(0, CONFIG_SYS_TIMERBASE + MTU_LR(0));
/*
* The load-register isn't really immediate: it changes on clock
@ -59,6 +55,8 @@ void reset_timer(void)
val = READ_TIMER();
while (READ_TIMER() == val)
;
return 0;
}
/* Return how many HZ passed since "base" */

View File

@ -65,12 +65,6 @@ int timer_init (void)
/*
* timer without interrupts
*/
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked () - base;

View File

@ -119,11 +119,6 @@ ulong get_timer_masked(void)
return timestamp;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return get_timer_masked() - base;

View File

@ -108,11 +108,6 @@ ulong get_timer_masked(void)
return gd->tbu;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return ((get_timer_masked() / (CONFIG_SYS_HZ_CLOCK / 1000)) -

View File

@ -76,12 +76,6 @@ int timer_init(void)
/*
* timer without interrupts
*/
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return (get_timer_masked() / GPT_RESOLUTION) - base;

View File

@ -94,12 +94,6 @@ int timer_init (void)
/*
* timer without interrupts
*/
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked () - base;

View File

@ -69,11 +69,6 @@ int timer_init(void)
return 0;
}
void reset_timer(void)
{
reset_timer_masked();
}
void reset_timer_masked(void)
{
ulong val = __raw_readl(&cur_gpt->counter);

View File

@ -63,11 +63,6 @@ int timer_init(void)
/*
* timer without interrupts
*/
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return get_timer_masked() - base;

View File

@ -50,11 +50,6 @@ int timer_init(void)
/*
* timer without interrupts
*/
void reset_timer(void)
{
reset_timer_masked();
}
unsigned long get_timer(unsigned long base)
{
return get_timer_masked() - base;

View File

@ -48,11 +48,6 @@ struct timerus *timer_base = (struct timerus *)NV_PA_TMRUS_BASE;
#define TIMER_LOAD_VAL 0xffffffff
/* timer without interrupts */
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer(ulong base)
{
return get_timer_masked() - base;

View File

@ -89,11 +89,6 @@ void reset_timer_masked(void)
gd->timestamp = 0;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer_masked(void)
{
return tick_to_time(get_ticks());

View File

@ -74,12 +74,6 @@ int timer_init (void)
/*
* timer without interrupts
*/
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return (get_timer_masked() - base);

View File

@ -59,16 +59,11 @@ static inline unsigned long long us_to_tick(unsigned long long us)
int timer_init (void)
{
reset_timer();
reset_timer_masked();
return 0;
}
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked () - base;

View File

@ -59,12 +59,6 @@ int timer_init (void)
/*
* timer without interrupts
*/
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked () - base;

View File

@ -34,11 +34,6 @@ int timer_init (void)
return 0;
}
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base)
{
return get_timer_masked ();

View File

@ -62,13 +62,6 @@ unsigned long long get_ticks(void)
return ((unsigned long long)hi_now << 32) | lo;
}
void reset_timer(void)
{
sysreg_write(COUNT, 0);
cpu_sync_pipeline(); /* process any pending interrupts */
timer_overflow = 0;
}
unsigned long get_timer(unsigned long base)
{
u64 now = get_ticks();

View File

@ -152,8 +152,3 @@ ulong get_timer(ulong base)
return (milisec - base);
}
void reset_timer(void)
{
timer_init();
}

View File

@ -95,11 +95,6 @@ void timer_init(void)
timerp->cr = SLT_CR_RUN | SLT_CR_IEN | SLT_CR_TEN;
}
void reset_timer(void)
{
timestamp = 0;
}
ulong get_timer(ulong base)
{
return (timestamp - base);

View File

@ -116,11 +116,6 @@ void timer_init(void)
DTIM_DTMR_FRR | DTIM_DTMR_ORRI | DTIM_DTMR_RST_EN;
}
void reset_timer(void)
{
timestamp = 0;
}
ulong get_timer(ulong base)
{
return (timestamp - base);

View File

@ -28,11 +28,6 @@
volatile int timestamp = 0;
void reset_timer (void)
{
timestamp = 0;
}
#ifdef CONFIG_SYS_TIMER_0
ulong get_timer (ulong base)
{
@ -61,7 +56,7 @@ int timer_init (void)
tmr->control = TIMER_INTERRUPT | TIMER_RESET;
tmr->control =
TIMER_ENABLE | TIMER_ENABLE_INTR | TIMER_RELOAD | TIMER_DOWN_COUNT;
reset_timer ();
timestamp = 0;
install_interrupt_handler (CONFIG_SYS_TIMER_0_IRQ, timer_isr, (void *)tmr);
return 0;
}

View File

@ -42,12 +42,6 @@ int timer_init(void)
return 0;
}
void reset_timer(void)
{
timestamp = 0;
write_c0_compare(read_c0_count() + CYCLES_PER_JIFFY);
}
ulong get_timer(ulong base)
{
unsigned int count;

View File

@ -137,11 +137,6 @@ void timer_interrupt (struct pt_regs *regs)
#endif /* CONFIG_SHOW_ACTIVITY */
}
void reset_timer (void)
{
timestamp = 0;
}
ulong get_timer (ulong base)
{
return (timestamp - base);

View File

@ -139,13 +139,6 @@ unsigned long get_timer (unsigned long base)
return tick_to_time(get_ticks()) - base;
}
void reset_timer (void)
{
tmu_timer_stop(0);
writel(0, TCNT0);
tmu_timer_start(0);
}
unsigned long get_tbclk (void)
{
return timer_freq;

View File

@ -90,14 +90,6 @@ ulong get_timer(ulong base)
return (get_usec() / 1000) - base;
}
void reset_timer(void)
{
cmt_timer_stop(0);
writew(CMT_TIMER_RESET, CMCOR_0);
cmt0_timer = 0;
cmt_timer_start(0);
}
void __udelay(unsigned long usec)
{
unsigned long end = get_usec() + usec;

View File

@ -90,11 +90,6 @@ void timer_interrupt(struct pt_regs *regs)
timestamp++;
}
void reset_timer(void)
{
timestamp = 0;
}
ulong get_timer(ulong base)
{
return (timestamp - base);
@ -104,7 +99,7 @@ void timer_interrupt_init(void)
{
int irq;
reset_timer();
timestamp = 0;
irq = timer_interrupt_init_cpu();

View File

@ -94,11 +94,6 @@ void timer_isr(void *unused)
}
}
void reset_timer (void)
{
system_ticks = 0;
}
ulong get_timer (ulong base)
{
return (system_ticks - base);

View File

@ -107,11 +107,6 @@ int timer_init (void)
/*
* timer without interrupts
*/
void reset_timer (void)
{
reset_timer_masked ();
}
ulong get_timer (ulong base_ticks)
{
return get_timer_masked () - base_ticks;

View File

@ -199,11 +199,6 @@ void reset_timer_masked(void)
timestamp = 0;
}
void reset_timer(void)
{
reset_timer_masked();
}
ulong get_timer_masked(void)
{
ulong now = readl(&systimer_base->timer0value) / 1000;

View File

@ -66,7 +66,6 @@ int board_early_init_f(void)
*/
int timer_init(void)
{
reset_timer();
return 0;
}