summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>2011-08-23 14:30:05 +0200
committerKumar Gala <galak@kernel.crashing.org>2011-11-24 01:28:42 -0600
commitae5f8c19827493e5a8d48c2c6a8a92201a94f08b (patch)
tree2a1cfd9f1156e4bed1a4e28e414d947c2af07779 /arch/powerpc/sysdev
parent05011f370a4f549da69f3841e319043728f65542 (diff)
downloadop-kernel-dev-ae5f8c19827493e5a8d48c2c6a8a92201a94f08b.zip
op-kernel-dev-ae5f8c19827493e5a8d48c2c6a8a92201a94f08b.tar.gz
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>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 3363fbc..ceb09cb 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/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
that the BRG divisor must be even if you're not using divide-by-16
mode. */
- if (!div16 && (divisor & 1))
+ if (!div16 && (divisor & 1) && (divisor > 3))
divisor++;
tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) |
OpenPOWER on IntegriCloud