diff options
author | Scott Wood <scottwood@freescale.com> | 2007-09-05 14:29:10 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-09-10 16:02:09 -0500 |
commit | 83fcdb4b352f74a8a74737aedeaf622c37140c73 (patch) | |
tree | 2f948f23d9bf48aa08f82ff48661440c969ffa1c /arch/powerpc | |
parent | 36c50f729b77144cae8d43457fefca66a4eeff6a (diff) | |
download | op-kernel-dev-83fcdb4b352f74a8a74737aedeaf622c37140c73.zip op-kernel-dev-83fcdb4b352f74a8a74737aedeaf622c37140c73.tar.gz |
[POWERPC] cpm2: Fix off-by-one error in setbrg().
The hardware adds one to the BRG value to get the divider, so it must
be subtracted by software. Without this patch, characters will occasionally
be corrupted.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/sysdev/cpm2_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/cpm2_common.c b/arch/powerpc/sysdev/cpm2_common.c index 9244129..c827715 100644 --- a/arch/powerpc/sysdev/cpm2_common.c +++ b/arch/powerpc/sysdev/cpm2_common.c @@ -102,7 +102,7 @@ cpm_setbrg(uint brg, uint rate) brg -= 4; } bp += brg; - *bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN; + out_be32(bp, (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN); cpm2_unmap(bp); } |