summaryrefslogtreecommitdiffstats
path: root/bsps/sparc/leon3/start/bspdelay.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bsps/sparc/leon3/start/bspdelay.c8
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(&regs->tcntval);
then += usecs;
- while (LEON3_Timer_Regs->timer[0].value >= then)
+ while (grlib_load_32(&regs->tcntval) >= then)
;
}