From: David Woodhouse <dwmw2@infradead.org>
To: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org, arnd@arndb.de
Subject: [PATCH] Handle reg-shift property for of_serial ports
Date: Sat, 07 Jul 2007 00:58:28 -0400 [thread overview]
Message-ID: <1183784308.3066.16.camel@shinybook.infradead.org> (raw)
The MV64660 has reg-shift==2 for its otherwise 16550-compatible uarts.
While the bootwrapper copes with this, of_serial.c doesn't. (The udbg
code doesn't either, but I'll fix that later).
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
index 7ffdaea..0761ff9 100644
--- a/drivers/serial/of_serial.c
+++ b/drivers/serial/of_serial.c
@@ -25,12 +25,13 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
{
struct resource resource;
struct device_node *np = ofdev->node;
- const unsigned int *clk, *spd;
+ const unsigned int *clk, *spd, *rs;
int ret;
memset(port, 0, sizeof *port);
spd = of_get_property(np, "current-speed", NULL);
clk = of_get_property(np, "clock-frequency", NULL);
+ rs = of_get_property(np, "reg-shift", NULL);
if (!clk) {
dev_warn(&ofdev->dev, "no clock-frequency property set\n");
return -ENODEV;
@@ -48,6 +49,8 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
port->iotype = UPIO_MEM;
port->type = type;
port->uartclk = *clk;
+ if (rs)
+ port->regshift = *rs;
port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
| UPF_FIXED_PORT;
port->dev = &ofdev->dev;
--
dwmw2
next reply other threads:[~2007-07-07 4:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-07 4:58 David Woodhouse [this message]
2007-07-07 12:10 ` [PATCH] Handle reg-shift property for of_serial ports Arnd Bergmann
2007-07-07 14:59 ` David Woodhouse
2007-07-07 16:51 ` David Woodhouse
2007-07-07 17:07 ` Sergei Shtylyov
2007-07-07 17:52 ` Arnd Bergmann
2007-07-07 22:15 ` Segher Boessenkool
2007-07-07 22:12 ` Segher Boessenkool
2007-07-07 17:55 ` Arnd Bergmann
2007-07-07 22:21 ` Segher Boessenkool
2007-07-07 22:06 ` Segher Boessenkool
2007-07-07 16:57 ` [PATCH 1/2] Add 'sparse16550' to of_serial.c and handle 'reg-shift' property David Woodhouse
2007-07-07 16:57 ` [PATCH 2/2] Add 'sparse16550' support to PowerPC bootwrapper David Woodhouse
2007-07-07 22:23 ` [PATCH] Handle reg-shift property for of_serial ports Segher Boessenkool
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=1183784308.3066.16.camel@shinybook.infradead.org \
--to=dwmw2@infradead.org \
--cc=arnd@arndb.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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).