Skip to content

Commit

Permalink
[PATCH] powerpc: serial port discovery: cope with broken firmware
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Woodhouse authored and Paul Mackerras committed Jan 9, 2006
1 parent 9177ae4 commit 31df167
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/powerpc/kernel/legacy_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ static int __init add_legacy_port(struct device_node *np, int want_index,

/* get clock freq. if present */
clk = (u32 *)get_property(np, "clock-frequency", NULL);
clock = clk ? *clk : BASE_BAUD * 16;
if (clk && *clk)
clock = *clk;
else
clock = BASE_BAUD * 16;

/* get default speed if present */
spd = (u32 *)get_property(np, "current-speed", NULL);
Expand Down

0 comments on commit 31df167

Please sign in to comment.