提交 d0e132b5 编写于 作者: K Kumar Gala 提交者: Paul Mackerras

[PATCH] powerpc: Loosen udbg_probe_uart_speed sanity checking

The checking of the baudrate in udbg_probe_uart_speed was
too tight and would cause reporting back of the default
baud rate in cases where the computed speed was valid.
Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 b226e462
......@@ -137,7 +137,7 @@ unsigned int udbg_probe_uart_speed(void __iomem *comport, unsigned int clock)
speed = (clock / prescaler) / (divisor * 16);
/* sanity check */
if (speed < 9600 || speed > 115200)
if (speed < 0 || speed > (clock / 16))
speed = 9600;
return speed;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册