On Thu, Jul 05, 2007 at 12:03:00PM -0500, Olof Johansson wrote:
> Workaround for errata 4290: The decrementer ticks at half the expected rate
> so load it with half the value it would otherwise be loaded with.
> 
> 
> Index: 2.6.21/include/asm-powerpc/time.h
> ===================================================================
> --- 2.6.21.orig/include/asm-powerpc/time.h
> +++ 2.6.21/include/asm-powerpc/time.h
> @@ -173,6 +173,13 @@ static inline unsigned int get_dec(void)
>  
>  static inline void set_dec(int val)
>  {
> +#ifdef CONFIG_PPC_PASEMI
> +     /* PA6T rev Ax have decrementer ticking at 1/2 tb rate */
> +     val >>= 2;

Comment does not match code: looks like a divide by 4 to me!

> +     if (!val)
> +             val = 1;
> +#endif
> +
>  #if defined(CONFIG_40x)
>       return;         /* Have to let it auto-reload */
>  #elif defined(CONFIG_8xx_CPU6)

        Gabriel
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to