aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/legacy_serial.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2005-11-24 12:08:56 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:50:42 -0500
commit31df1678d7732b94178a6e457ed6666e4431212f (patch)
treee464f609dd5fa95a28da60127c79db24bd44152e /arch/powerpc/kernel/legacy_serial.c
parent9177ae4378add0126104e2966aa6150258610d59 (diff)
[PATCH] powerpc: serial port discovery: cope with broken firmware
On Tue, 2005-11-22 at 15:49 +1100, Benjamin Herrenschmidt wrote: > This moves the discovery of legacy serial ports to a separate file, > makes it common to ppc32 and ppc64, and reworks it to use the new OF > address translators to get to the ports early. This new version can also > detect some PCI serial cards using legacy chips and will probably match > those discovered port with the default console choice. This makes it deal with the fact that the Pegasos firmware reports that its clock frequency is zero... Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/legacy_serial.c')
-rw-r--r--arch/powerpc/kernel/legacy_serial.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 28ad50e424a9..7a685cae81ed 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -43,7 +43,10 @@ static int __init add_legacy_port(struct device_node *np, int want_index,
43 43
44 /* get clock freq. if present */ 44 /* get clock freq. if present */
45 clk = (u32 *)get_property(np, "clock-frequency", NULL); 45 clk = (u32 *)get_property(np, "clock-frequency", NULL);
46 clock = clk ? *clk : BASE_BAUD * 16; 46 if (clk && *clk)
47 clock = *clk;
48 else
49 clock = BASE_BAUD * 16;
47 50
48 /* get default speed if present */ 51 /* get default speed if present */
49 spd = (u32 *)get_property(np, "current-speed", NULL); 52 spd = (u32 *)get_property(np, "current-speed", NULL);