forked from Minki/linux
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>
This commit is contained in:
parent
05011f370a
commit
ae5f8c1982
@ -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) |
|
||||||
|
Loading…
Reference in New Issue
Block a user