Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=83fcdb4b352f74a8a74737aedeaf622c37140c73
Commit:     83fcdb4b352f74a8a74737aedeaf622c37140c73
Parent:     36c50f729b77144cae8d43457fefca66a4eeff6a
Author:     Scott Wood <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 5 14:29:10 2007 -0500
Committer:  Kumar Gala <[EMAIL PROTECTED]>
CommitDate: Mon Sep 10 16:02:09 2007 -0500

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---
 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);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to