summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-05 19:23:05 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-12-05 19:23:05 +0000
commite57b0e23d4781e597299281524f6395dae4a25ad (patch)
treee38d371378fd92931847deee5076c3b44d23ac83 /c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
parentbug fix in statistics from Tony Bennett (tbennett@divnc.com) (diff)
downloadrtems-e57b0e23d4781e597299281524f6395dae4a25ad.tar.bz2
update from Andy Bray <andy@i-cubed.co.uk>
Diffstat (limited to '')
-rw-r--r--c/src/lib/libcpu/powerpc/ppc403/timer/timer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c b/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
index d18d31c4bc..4d2f4c0fd4 100644
--- a/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
+++ b/c/src/lib/libcpu/powerpc/ppc403/timer/timer.c
@@ -6,7 +6,7 @@
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
*
- * Author: Andrew Bray <andy@i-cubed.demon.co.uk>
+ * Author: Andrew Bray <andy@i-cubed.co.uk>
*
* COPYRIGHT (c) 1995 by i-cubed ltd.
*
@@ -49,7 +49,7 @@ static INLINE rtems_unsigned32 get_itimer(void)
{
rtems_unsigned32 ret;
- asm volatile ("mftblo %0" : "=r" ((ret)));
+ asm volatile ("mfspr %0, 0x3dd" : "=r" ((ret))); /* TBLO */
return ret;
}
@@ -58,10 +58,10 @@ void Timer_initialize()
{
rtems_unsigned32 iocr;
- asm volatile ("mfiocr %0" : "=r" (iocr));
+ asm volatile ("mfdcr %0, 0xa0" : "=r" (iocr)); /* IOCR */
iocr &= ~4;
iocr |= 4; /* Select external timer clock */
- asm volatile ("mtiocr %0" : "=r" (iocr) : "0" (iocr));
+ asm volatile ("mtdcr 0xa0, %0" : "=r" (iocr) : "0" (iocr)); /* IOCR */
Timer_starting = get_itimer();
}