From d0e132b536b6c8044991932d0c160676c46c98e5 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 20 Dec 2005 16:16:26 -0600 Subject: [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 e58c048..7541bf4 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; -- cgit v0.10.2