From bb7bd148ba4bcbc2b1a1e4d17118c4c4b5464f9b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 22 Dec 2014 11:46:17 +0100 Subject: powerpc: Use alternate time base for CPU counter --- cpukit/score/cpu/powerpc/rtems/score/cpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpukit/score/cpu/powerpc/rtems/score/cpu.h') diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h index 15854d54aa..2d3f05fe70 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h +++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h @@ -782,9 +782,9 @@ static inline CPU_Counter_ticks _CPU_Counter_read( void ) { CPU_Counter_ticks value; -#ifdef ppc8540 - /* Book E has no mftb */ - __asm__ volatile( "mfspr %0, 268" : "=r" (value) ); +#if defined(ppc8540) || defined(__PPC_CPU_E6500__) + /* Use Alternate Time Base */ + __asm__ volatile( "mfspr %0, 526" : "=r" (value) ); #else __asm__ volatile( "mftb %0" : "=r" (value) ); #endif -- cgit v1.2.3