From: Kumar Gala Date: Tue, 20 Dec 2005 22:16:26 +0000 (-0600) Subject: [PATCH] powerpc: Loosen udbg_probe_uart_speed sanity checking X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d0e132b536b6c8044991932d0c160676c46c98e5;p=openwrt%2Fstaging%2Fblogic.git [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: Kumar Gala Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index e58c048a7b19..7541bf44d2da 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b/arch/powerpc/kernel/udbg_16550.c @@ -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;