[PATCH 02/12] serial: ns16550: omap: set register shift from code

Sascha Hauer s.hauer at pengutronix.de
Mon Apr 28 00:45:51 PDT 2014


The upstream dts files do not contain the register shift. As
we have Omap specific init code anyway we can just set the register
shift from there instead of relying on the devicetree properties.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/serial/serial_ns16550.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 0c00eb1..a2a25fa 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -194,6 +194,10 @@ static void ns16450_serial_init_port(struct console_device *cdev)
 
 static void ns16550_omap_init_port(struct console_device *cdev)
 {
+	struct ns16550_priv *priv = to_ns16550_priv(cdev);
+
+	priv->plat.shift = 2;
+
 	ns16550_serial_init_port(cdev);
 
 	ns16550_write(cdev, 0x07, omap_mdr1);	/* Disable */
-- 
1.9.1




More information about the barebox mailing list