diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-11 13:37:44 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-11 13:37:44 +1100 |
commit | edbc29d76ddbc9bd56e1cbc772188f70c616ffe1 (patch) | |
tree | 71b994ba493c46e10189c090fd17fe2da80281ec /arch/powerpc/sysdev/cpm2.c | |
parent | 1db8508cf483dc1ecf66141f90a7c03659d69512 (diff) | |
parent | a0e8618c71b9b685977c1407dee928d86c5bdc2c (diff) |
Merge commit 'kumar/next' into next
Diffstat (limited to 'arch/powerpc/sysdev/cpm2.c')
-rw-r--r-- | arch/powerpc/sysdev/cpm2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/cpm2.c b/arch/powerpc/sysdev/cpm2.c index f1c3395633b..474d176a6ec 100644 --- a/arch/powerpc/sysdev/cpm2.c +++ b/arch/powerpc/sysdev/cpm2.c @@ -129,7 +129,8 @@ void __cpm2_setbrg(uint brg, uint rate, uint clk, int div16, int src) brg -= 4; } bp += brg; - val = (((clk / rate) - 1) << 1) | CPM_BRG_EN | src; + /* Round the clock divider to the nearest integer. */ + val = (((clk * 2 / rate) - 1) & ~1) | CPM_BRG_EN | src; if (div16) val |= CPM_BRG_DIV16; |