OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [sw/] [drivers/] [or1200/] [or1200-utils.c] - Diff between revs 411 and 488

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 411 Rev 488
Line 73... Line 73...
  mtspr(SPR_TTMR, 0);
  mtspr(SPR_TTMR, 0);
 
 
}
}
 
 
/* Timer increment - called by interrupt routine */
/* Timer increment - called by interrupt routine */
/* Now actually done in interrupt vector code in crt0.S */
 
void
void
cpu_timer_tick(void)
cpu_timer_tick(void)
{
{
  timer_ticks++;
  timer_ticks++;
  mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD));
  // Reset timer mode register to interrupt with same interval
 
  mtspr(SPR_TTMR, SPR_TTMR_IE | SPR_TTMR_RT |
 
        ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD));
}
}
 
 
/* Reset tick counter */
/* Reset tick counter */
void
void
cpu_reset_timer_ticks(void)
cpu_reset_timer_ticks(void)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.