From 93f5adb644363d321ddfcbf48586296ed7add189 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 15 Jul 2015 10:51:12 +0200 Subject: powerpc: Do not use the ATB for e500 multilib The e500v1 has no support for the ATB. Update #2369. --- c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c | 8 +++++++- cpukit/score/cpu/powerpc/rtems/score/cpu.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c b/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c index 724e5b3b73..6d121eaa0a 100644 --- a/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/qoriq/startup/bspstart.c @@ -90,7 +90,13 @@ void bsp_start(void) BSP_bus_frequency = bsp_uboot_board_info.bi_busfreq / QORIQ_BUS_CLOCK_DIVIDER; bsp_clicks_per_usec = BSP_bus_frequency / 8000000; - rtems_counter_initialize_converter(bsp_uboot_board_info.bi_intfreq); + rtems_counter_initialize_converter( + #ifdef __PPC_CPU_E6500__ + bsp_uboot_board_info.bi_intfreq + #else + BSP_bus_frequency / 8 + #endif + ); #endif /* HAS_UBOOT */ /* Initialize some console parameters */ diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h index 45298a46dd..7fef878599 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h +++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h @@ -838,7 +838,7 @@ static inline CPU_Counter_ticks _CPU_Counter_read( void ) { CPU_Counter_ticks value; -#if defined(ppc8540) || defined(__PPC_CPU_E6500__) +#if defined(__PPC_CPU_E6500__) /* Use Alternate Time Base */ __asm__ volatile( "mfspr %0, 526" : "=r" (value) ); #else -- cgit v1.2.3