Timer: Remove set_timer completely

master
Graeme Russ 14 years ago committed by Wolfgang Denk
parent dcac25a05e
commit 5c8404aff1
  1. 5
      arch/arm/cpu/arm1136/mx31/timer.c
  2. 4
      arch/arm/cpu/arm1136/mx35/timer.c
  3. 5
      arch/arm/cpu/arm1136/omap24xx/timer.c
  4. 5
      arch/arm/cpu/arm1176/s3c64xx/timer.c
  5. 5
      arch/arm/cpu/arm1176/tnetv107x/timer.c
  6. 5
      arch/arm/cpu/arm720t/interrupts.c
  7. 6
      arch/arm/cpu/arm920t/a320/timer.c
  8. 5
      arch/arm/cpu/arm920t/at91/timer.c
  9. 5
      arch/arm/cpu/arm920t/at91rm9200/timer.c
  10. 5
      arch/arm/cpu/arm920t/imx/timer.c
  11. 5
      arch/arm/cpu/arm920t/ks8695/timer.c
  12. 5
      arch/arm/cpu/arm920t/s3c24x0/timer.c
  13. 5
      arch/arm/cpu/arm925t/timer.c
  14. 5
      arch/arm/cpu/arm926ejs/armada100/timer.c
  15. 5
      arch/arm/cpu/arm926ejs/kirkwood/timer.c
  16. 5
      arch/arm/cpu/arm926ejs/mx25/timer.c
  17. 5
      arch/arm/cpu/arm926ejs/mx27/timer.c
  18. 5
      arch/arm/cpu/arm926ejs/omap/timer.c
  19. 5
      arch/arm/cpu/arm926ejs/orion5x/timer.c
  20. 5
      arch/arm/cpu/arm926ejs/pantheon/timer.c
  21. 5
      arch/arm/cpu/arm926ejs/spear/timer.c
  22. 5
      arch/arm/cpu/arm926ejs/versatile/timer.c
  23. 5
      arch/arm/cpu/armv7/mx5/timer.c
  24. 5
      arch/arm/cpu/armv7/omap-common/timer.c
  25. 5
      arch/arm/cpu/armv7/s5p-common/timer.c
  26. 5
      arch/arm/cpu/armv7/tegra2/timer.c
  27. 5
      arch/arm/cpu/armv7/u8500/timer.c
  28. 5
      arch/arm/cpu/ixp/timer.c
  29. 5
      arch/arm/cpu/lh7a40x/timer.c
  30. 5
      arch/arm/cpu/pxa/timer.c
  31. 5
      arch/arm/cpu/s3c44b0/timer.c
  32. 5
      arch/arm/cpu/sa1100/timer.c
  33. 16
      arch/avr32/cpu/interrupts.c
  34. 4
      arch/m68k/cpu/mcf547x_8x/slicetimer.c
  35. 2
      arch/m68k/lib/board.c
  36. 16
      arch/m68k/lib/time.c
  37. 5
      arch/microblaze/cpu/timer.c
  38. 6
      arch/mips/cpu/mips32/time.c
  39. 6
      arch/nios2/cpu/interrupts.c
  40. 2
      arch/powerpc/lib/board.c
  41. 5
      arch/powerpc/lib/interrupts.c
  42. 7
      arch/sh/lib/time.c
  43. 9
      arch/sh/lib/time_sh2.c
  44. 2
      arch/sparc/lib/board.c
  45. 5
      arch/sparc/lib/interrupts.c
  46. 2
      arch/x86/lib/board.c
  47. 5
      arch/x86/lib/timer.c
  48. 6
      board/armltd/integrator/timer.c
  49. 1
      include/common.h

@ -147,11 +147,6 @@ ulong get_timer (ulong base)
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)
{

@ -92,10 +92,6 @@ ulong get_timer(ulong base)
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.

@ -67,11 +67,6 @@ ulong get_timer (ulong base)
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)
{

@ -159,11 +159,6 @@ ulong get_timer(ulong base)
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;

@ -88,11 +88,6 @@ ulong get_timer(ulong base)
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);

@ -219,11 +219,6 @@ ulong get_timer (ulong base)
return get_timer_masked () - base;
}
void set_timer (ulong t)
{
timestamp = t;
}
void __udelay (unsigned long usec)
{
ulong tmo;

@ -132,12 +132,6 @@ ulong get_timer(ulong base)
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)
{

@ -83,11 +83,6 @@ ulong get_timer(ulong base)
return get_timer_masked() - base;
}
void set_timer(ulong t)
{
gd->tbl = t;
}
void __udelay(unsigned long usec)
{
udelay_masked(usec);

@ -82,11 +82,6 @@ ulong get_timer (ulong base)
return get_timer_masked () - base;
}
void set_timer (ulong t)
{
timestamp = t;
}
void __udelay (unsigned long usec)
{
udelay_masked(usec);

@ -62,11 +62,6 @@ ulong get_timer (ulong base)
return get_timer_masked() - base;
}
void set_timer (ulong t)
{
/* nop */
}
void reset_timer_masked (void)
{
TCTL1 &= ~TCTL_TEN;

@ -76,11 +76,6 @@ ulong get_timer(ulong base)
return (get_timer_masked() - base);
}
void set_timer(ulong t)
{
timer_ticks = t;
}
void __udelay(ulong usec)
{
ulong start = get_timer_masked();

@ -94,11 +94,6 @@ ulong get_timer(ulong base)
return get_timer_masked() - base;
}
void set_timer(ulong t)
{
timestamp = t;
}
void __udelay (unsigned long usec)
{
ulong tmo;

@ -75,11 +75,6 @@ ulong get_timer (ulong base)
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)
{

@ -111,11 +111,6 @@ ulong get_timer(ulong base)
base);
}
void set_timer(ulong t)
{
gd->tbu = t;
}
void __udelay(unsigned long usec)
{
ulong delayticks;

@ -122,11 +122,6 @@ ulong get_timer(ulong base)
return get_timer_masked() - base;
}
void set_timer(ulong t)
{
timestamp = t;
}
void __udelay(unsigned long usec)
{
uint current;

@ -170,11 +170,6 @@ ulong get_timer (ulong base)
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)
{

@ -173,11 +173,6 @@ ulong get_timer (ulong base)
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)
{

@ -76,11 +76,6 @@ ulong get_timer (ulong base)
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)
{

@ -129,11 +129,6 @@ ulong get_timer(ulong base)
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));

@ -119,11 +119,6 @@ ulong get_timer(ulong base)
base);
}
void set_timer(ulong t)
{
gd->tbu = t;
}
void __udelay(unsigned long usec)
{
ulong delayticks;

@ -87,11 +87,6 @@ ulong get_timer(ulong base)
return (get_timer_masked() / GPT_RESOLUTION) - base;
}
void set_timer(ulong t)
{
timestamp = t;
}
void __udelay(unsigned long usec)
{
ulong tmo;

@ -105,11 +105,6 @@ ulong get_timer (ulong base)
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)
{

@ -99,11 +99,6 @@ ulong get_timer(ulong base)
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)
{

@ -73,11 +73,6 @@ ulong get_timer(ulong base)
return get_timer_masked() - base;
}
void set_timer(ulong t)
{
gd->tbl = t;
}
/* delay x useconds */
void __udelay(unsigned long usec)
{

@ -60,11 +60,6 @@ unsigned long get_timer(unsigned long base)
return get_timer_masked() - base;
}
void set_timer(unsigned long t)
{
gd->tbl = t;
}
/* delay x useconds */
void __udelay(unsigned long usec)
{

@ -58,11 +58,6 @@ ulong get_timer(ulong base)
return get_timer_masked() - base;
}
void set_timer(ulong t)
{
gd->tbl = t;
}
/* delay x useconds */
void __udelay(unsigned long usec)
{

@ -129,11 +129,6 @@ ulong get_timer(ulong base)
return get_timer_masked() - base;
}
void set_timer(ulong t)
{
gd->tbl = t;
}
/*
* Emulation of Power architecture long long timebase.
*

@ -104,11 +104,6 @@ ulong get_timer(ulong base)
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)
{

@ -85,11 +85,6 @@ ulong get_timer (ulong base)
return (get_timer_masked() - base);
}
void set_timer (ulong t)
{
timestamp = t;
}
void __udelay (unsigned long usec)
{
ulong tmo,tmp;

@ -74,11 +74,6 @@ ulong get_timer (ulong base)
return get_timer_masked () - base;
}
void set_timer (ulong t)
{
/* nop */
}
void __udelay (unsigned long usec)
{
udelay_masked (usec);

@ -70,11 +70,6 @@ ulong get_timer (ulong base)
return get_timer_masked () - base;
}
void set_timer (ulong t)
{
timestamp = t;
}
void __udelay (unsigned long usec)
{
ulong tmo;

@ -44,11 +44,6 @@ ulong get_timer (ulong base)
return get_timer_masked ();
}
void set_timer (ulong t)
{
/* nop */
}
void __udelay (unsigned long usec)
{
udelay_masked (usec);

@ -77,22 +77,6 @@ unsigned long get_timer(unsigned long base)
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.
*/

@ -105,8 +105,4 @@ ulong get_timer(ulong base)
return (timestamp - base);
}
void set_timer(ulong t)
{
timestamp = t;
}
#endif /* CONFIG_SLTTMR */

@ -574,8 +574,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
udelay (20);
set_timer (0);
/* Insert function pointers now that we have relocated the code */
/* Initialize from environment */

@ -126,10 +126,6 @@ ulong get_timer(ulong base)
return (timestamp - base);
}
void set_timer(ulong t)
{
timestamp = t;
}
#endif /* CONFIG_MCFTMR */
#if defined(CONFIG_MCFPIT)
@ -173,14 +169,6 @@ void timer_init(void)
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;
@ -196,8 +184,8 @@ ulong get_timer(ulong base)
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 */

@ -45,11 +45,6 @@ ulong get_timer (ulong base)
}
#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);

@ -64,12 +64,6 @@ ulong get_timer(ulong base)
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;

@ -98,12 +98,6 @@ ulong get_timer (ulong base)
return (timestamp - base);
}
void set_timer (ulong t)
{
timestamp = t;
}
/* The board must handle this interrupt if a timer is not
* provided.
*/

@ -932,8 +932,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
udelay (20);
set_timer (0);
/* Initialize from environment */
if ((s = getenv ("loadaddr")) != NULL) {
load_addr = simple_strtoul (s, NULL, 16);

@ -146,8 +146,3 @@ ulong get_timer (ulong base)
{
return (timestamp - base);
}
void set_timer (ulong t)
{
timestamp = t;
}

@ -139,15 +139,10 @@ unsigned long get_timer (unsigned long base)
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);
}

@ -54,7 +54,7 @@ int timer_init(void)
/* 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;
@ -90,15 +90,10 @@ ulong get_timer(ulong base)
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);
}

@ -365,8 +365,6 @@ void board_init_f(ulong bootflag)
udelay(20);
set_timer(0);
/* Initialize from environment */
if ((s = getenv("loadaddr")) != NULL) {
load_addr = simple_strtoul(s, NULL, 16);

@ -100,11 +100,6 @@ ulong get_timer(ulong base)
return (timestamp - base);
}
void set_timer(ulong t)
{
timestamp = t;
}
void timer_interrupt_init(void)
{
int irq;

@ -363,8 +363,6 @@ void board_init_r(gd_t *id, ulong dest_addr)
udelay(20);
set_timer (0);
/* Initialize from environment */
if ((s = getenv ("loadaddr")) != NULL) {
load_addr = simple_strtoul (s, NULL, 16);

@ -103,8 +103,3 @@ ulong get_timer (ulong base)
{
return (system_ticks - base);
}
void set_timer (ulong t)
{
system_ticks = t;
}

@ -117,12 +117,6 @@ ulong get_timer (ulong base_ticks)
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)
{

@ -587,7 +587,6 @@ void irq_install_handler(int, interrupt_handler_t *, void *);
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);

Loading…
Cancel
Save