提交 83fcdb4b 编写于 作者: S Scott Wood 提交者: Kumar Gala

[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: NScott Wood <scottwood@freescale.com>
Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
上级 36c50f72
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册