return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- gd->tbl = time_to_tick(t);
-}
-
/* delay x useconds AND preserve advance timestamp value */
void __udelay (unsigned long usec)
{
return (tmp / 1000) - base;
}
-void set_timer(ulong t)
-{
-}
-
/*
* delay x useconds AND preserve advance timstamp value
* GPTCNT is now supposed to tick 1 by 1 us.
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- gd->tbl = t;
-}
-
/* delay x useconds AND preserve advance timestamp value */
void __udelay (unsigned long usec)
{
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- timestamp = t * (timer_load_val / (100 * CONFIG_SYS_HZ));
-}
-
void __udelay(unsigned long usec)
{
unsigned long long tmp;
return (get_timer_raw() / (TIMER_LOAD_VAL / TIM_CLK_DIV)) - base;
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
-
unsigned long long get_ticks(void)
{
return get_timer(0);
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- timestamp = t;
-}
-
void __udelay (unsigned long usec)
{
ulong tmo;
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- debug("%s(%lx)\n", __func__, t);
- timestamp = t;
-}
-
/* delay x useconds AND preserve advance timestamp value */
void __udelay(unsigned long usec)
{
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- gd->tbl = t;
-}
-
void __udelay(unsigned long usec)
{
udelay_masked(usec);
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- timestamp = t;
-}
-
void __udelay (unsigned long usec)
{
udelay_masked(usec);
return get_timer_masked() - base;
}
-void set_timer (ulong t)
-{
- /* nop */
-}
-
void reset_timer_masked (void)
{
TCTL1 &= ~TCTL_TEN;
return (get_timer_masked() - base);
}
-void set_timer(ulong t)
-{
- timer_ticks = t;
-}
-
void __udelay(ulong usec)
{
ulong start = get_timer_masked();
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
-
void __udelay (unsigned long usec)
{
ulong tmo;
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- timestamp = t;
-}
-
/* delay x useconds AND preserve advance timestamp value */
void __udelay (unsigned long usec)
{
base);
}
-void set_timer(ulong t)
-{
- gd->tbu = t;
-}
-
void __udelay(unsigned long usec)
{
ulong delayticks;
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
-
void __udelay(unsigned long usec)
{
uint current;
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- timestamp = time_to_tick(t);
-}
-
/* delay x useconds AND preserve advance timstamp value */
void __udelay (unsigned long usec)
{
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- timestamp = time_to_tick(t);
-}
-
/* delay x useconds AND preserve advance timstamp value */
void __udelay (unsigned long usec)
{
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- timestamp = t;
-}
-
/* delay x useconds AND preserve advance timestamp value */
void __udelay (unsigned long usec)
{
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
-
static inline ulong uboot_cntr_val(void)
{
return readl(CNTMR_VAL_REG(UBOOT_CNTR));
base);
}
-void set_timer(ulong t)
-{
- gd->tbu = t;
-}
-
void __udelay(unsigned long usec)
{
ulong delayticks;
return (get_timer_masked() / GPT_RESOLUTION) - base;
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
-
void __udelay(unsigned long usec)
{
ulong tmo;
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- timestamp = t;
-}
-
/* delay x useconds AND preserve advance timestamp value */
void __udelay (unsigned long usec)
{
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
-
/* delay x useconds AND preserve advance timestamp value */
void __udelay(unsigned long usec)
{
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- gd->tbl = t;
-}
-
/* delay x useconds */
void __udelay(unsigned long usec)
{
return get_timer_masked() - base;
}
-void set_timer(unsigned long t)
-{
- gd->tbl = t;
-}
-
/* delay x useconds */
void __udelay(unsigned long usec)
{
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- gd->tbl = t;
-}
-
/* delay x useconds */
void __udelay(unsigned long usec)
{
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- gd->tbl = t;
-}
-
/*
* Emulation of Power architecture long long timebase.
*
return get_timer_masked() - base;
}
-void set_timer(ulong t)
-{
- gd->timestamp = time_to_tick(t);
-}
-
/* delay x useconds AND preserve advance timestamp value */
void __udelay(unsigned long usec)
{
return (get_timer_masked() - base);
}
-void set_timer (ulong t)
-{
- timestamp = t;
-}
-
void __udelay (unsigned long usec)
{
ulong tmo,tmp;
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- /* nop */
-}
-
void __udelay (unsigned long usec)
{
udelay_masked (usec);
return get_timer_masked () - base;
}
-void set_timer (ulong t)
-{
- timestamp = t;
-}
-
void __udelay (unsigned long usec)
{
ulong tmo;
return get_timer_masked ();
}
-void set_timer (ulong t)
-{
- /* nop */
-}
-
void __udelay (unsigned long usec)
{
udelay_masked (usec);
return (unsigned long)(now >> 32) - base;
}
-void set_timer(unsigned long t)
-{
- unsigned long long ticks = t;
- unsigned long lo, hi, hi_new;
-
- ticks = (ticks * get_tbclk()) / CONFIG_SYS_HZ;
- hi = ticks >> 32;
- lo = ticks & 0xffffffffUL;
-
- do {
- timer_overflow = hi;
- sysreg_write(COUNT, lo);
- hi_new = timer_overflow;
- } while (hi_new != hi);
-}
-
/*
* For short delays only. It will overflow after a few seconds.
*/
return (timestamp - base);
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
#endif /* CONFIG_SLTTMR */
udelay (20);
- set_timer (0);
-
/* Insert function pointers now that we have relocated the code */
/* Initialize from environment */
return (timestamp - base);
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
#endif /* CONFIG_MCFTMR */
#if defined(CONFIG_MCFPIT)
timerp->pcsr |= PIT_PCSR_PRE(CONFIG_SYS_PIT_PRESCALE) | PIT_PCSR_EN;
}
-void set_timer(ulong t)
-{
- volatile pit_t *timerp = (pit_t *) (CONFIG_SYS_PIT_BASE);
-
- timestamp = 0;
- timerp->pmr = lastinc = 0;
-}
-
ulong get_timer(ulong base)
{
unsigned short now, diff;
void wait_ticks(unsigned long ticks)
{
- set_timer(0);
- while (get_timer(0) < ticks) ;
+ u32 start = get_timer(0);
+ while (get_timer(start) < ticks) ;
}
#endif /* CONFIG_MCFPIT */
}
#endif
-void set_timer (ulong t)
-{
- timestamp = t;
-}
-
#ifdef CONFIG_SYS_INTC_0
#ifdef CONFIG_SYS_TIMER_0
microblaze_timer_t *tmr = (microblaze_timer_t *) (CONFIG_SYS_TIMER_0_ADDR);
return (timestamp - base);
}
-void set_timer(ulong t)
-{
- timestamp = t;
- write_c0_compare(read_c0_count() + CYCLES_PER_JIFFY);
-}
-
void __udelay(unsigned long usec)
{
unsigned int tmo;
return (timestamp - base);
}
-void set_timer (ulong t)
-{
- timestamp = t;
-}
-
-
/* The board must handle this interrupt if a timer is not
* provided.
*/
udelay (20);
- set_timer (0);
-
/* Initialize from environment */
if ((s = getenv ("loadaddr")) != NULL) {
load_addr = simple_strtoul (s, NULL, 16);
{
return (timestamp - base);
}
-
-void set_timer (ulong t)
-{
- timestamp = t;
-}
return tick_to_time(get_ticks()) - base;
}
-void set_timer (unsigned long t)
-{
- writel((0 - t), TCNT0);
-}
-
void reset_timer (void)
{
tmu_timer_stop(0);
- set_timer (0);
+ writel(0, TCNT0);
tmu_timer_start(0);
}
/* User Device 0 only */
cmt_timer_stop(0);
- set_timer(CMT_TIMER_RESET);
+ writew(CMT_TIMER_RESET, CMCOR_0);
cmt_timer_start(0);
return 0;
return (get_usec() / 1000) - base;
}
-void set_timer(ulong t)
-{
- writew((u16) t, CMCOR_0);
-}
-
void reset_timer(void)
{
cmt_timer_stop(0);
- set_timer(CMT_TIMER_RESET);
+ writew(CMT_TIMER_RESET, CMCOR_0);
cmt0_timer = 0;
cmt_timer_start(0);
}
udelay(20);
- set_timer(0);
-
/* Initialize from environment */
if ((s = getenv("loadaddr")) != NULL) {
load_addr = simple_strtoul(s, NULL, 16);
return (timestamp - base);
}
-void set_timer(ulong t)
-{
- timestamp = t;
-}
-
void timer_interrupt_init(void)
{
int irq;
udelay(20);
- set_timer (0);
-
/* Initialize from environment */
if ((s = getenv ("loadaddr")) != NULL) {
load_addr = simple_strtoul (s, NULL, 16);
{
return (system_ticks - base);
}
-
-void set_timer (ulong t)
-{
- system_ticks = t;
-}
return get_timer_masked () - base_ticks;
}
-void set_timer (ulong ticks)
-{
- timestamp = ticks;
- total_count = ticks * div_timer;
-}
-
/* delay usec useconds */
void __udelay (unsigned long usec)
{
void irq_free_handler (int);
void reset_timer (void);
ulong get_timer (ulong base);
-void set_timer (ulong t);
void enable_interrupts (void);
int disable_interrupts (void);