linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc64-dev <linuxppc64-dev@ozlabs.org>,
	linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH] powerpc: serial port discovery
Date: Thu, 24 Nov 2005 17:08:56 +0000	[thread overview]
Message-ID: <1132852136.11921.85.camel@baythorne.infradead.org> (raw)
In-Reply-To: <1132634960.26560.133.camel@gaston>

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>

diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 28ad50e..7a685ca 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
 
 	/* 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);

-- 
dwmw2

  reply	other threads:[~2005-11-24 17:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22  4:49 [PATCH] powerpc: serial port discovery Benjamin Herrenschmidt
2005-11-24 17:08 ` David Woodhouse [this message]
2005-11-24 20:57   ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1132852136.11921.85.camel@baythorne.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc64-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).