Browse Source

powerpc/qe: Fixup QE_General4 errata

QE_General4 should only round up the divisor iff divisor is > 3.
Rounding up lower divisors makes the error too big, causing USB
on MPC832x to fail.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Joakim Tjernlund 14 years ago
parent
commit
ae5f8c1982
1 changed files with 1 additions and 1 deletions
  1. 1 1
      arch/powerpc/sysdev/qe_lib/qe.c

+ 1 - 1
arch/powerpc/sysdev/qe_lib/qe.c

@@ -216,7 +216,7 @@ int qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier)
 	/* Errata QE_General4, which affects some MPC832x and MPC836x SOCs, says
 	/* Errata QE_General4, which affects some MPC832x and MPC836x SOCs, says
 	   that the BRG divisor must be even if you're not using divide-by-16
 	   that the BRG divisor must be even if you're not using divide-by-16
 	   mode. */
 	   mode. */
-	if (!div16 && (divisor & 1))
+	if (!div16 && (divisor & 1) && (divisor > 3))
 		divisor++;
 		divisor++;
 
 
 	tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) |
 	tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) |