diff options
Diffstat (limited to 'bsps/sparc/leon3/start/bspdelay.c')
-rw-r--r-- | bsps/sparc/leon3/start/bspdelay.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bsps/sparc/leon3/start/bspdelay.c b/bsps/sparc/leon3/start/bspdelay.c index c4a880be6d..6695f76929 100644 --- a/bsps/sparc/leon3/start/bspdelay.c +++ b/bsps/sparc/leon3/start/bspdelay.c @@ -14,15 +14,17 @@ */ #include <bsp.h> -#include <leon.h> +#include <bsp/leon3.h> void rtems_bsp_delay(int usecs) { uint32_t then; + gptimer_timer *regs; - then =LEON3_Timer_Regs->timer[0].value; + regs = &LEON3_Timer_Regs->timer[0]; + then =grlib_load_32(®s->tcntval); then += usecs; - while (LEON3_Timer_Regs->timer[0].value >= then) + while (grlib_load_32(®s->tcntval) >= then) ; } |