All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Handle reg-shift property for of_serial ports
@ 2007-07-07  4:58 David Woodhouse
  2007-07-07 12:10 ` Arnd Bergmann
  0 siblings, 1 reply; 14+ messages in thread
From: David Woodhouse @ 2007-07-07  4:58 UTC (permalink / raw)
  To: paulus; +Cc: linuxppc-dev, arnd

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-07-07 22:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-07  4:58 [PATCH] Handle reg-shift property for of_serial ports David Woodhouse
2007-07-07 12:10 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.