summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-07-12 07:10:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-07-12 07:10:18 +0200
commit5ed435f33dc6a31cd93b6f38a14dd775977cf1cc (patch)
treea5679efee0260214cece15ba83938e4c6f007f11 /drivers/serial
parent05f49fa0edb6166f80b8a37a172d6b83db2d92d1 (diff)
parentba927c778091295310fdb105e10c257a0cfc61a3 (diff)
downloadbarebox-5ed435f33dc6a31cd93b6f38a14dd775977cf1cc.tar.gz
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial_ns16550.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 4c84d27..3edeb0d 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -314,12 +314,15 @@ static int ns16550_tstc(struct console_device *cdev)
static void ns16550_probe_dt(struct device_d *dev, struct ns16550_priv *priv)
{
struct device_node *np = dev->device_node;
+ u32 offset;
u32 width = 1;
if (!IS_ENABLED(CONFIG_OFDEVICE))
return;
of_property_read_u32(np, "clock-frequency", &priv->plat.clock);
+ if (of_property_read_u32(np, "reg-offset", &offset) == 0)
+ priv->mmiobase += offset;
of_property_read_u32(np, "reg-shift", &priv->plat.shift);
of_property_read_u32(np, "reg-io-width", &width);
switch (width) {