summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-02-24 13:00:53 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-23 20:11:30 +0100
commitc7388ba1090255168aeec594a5b6fc7d7643ac4c (patch)
tree44442b20378bec0424ea6fb3c48b363f64dd17e2 /drivers/tty/serial
parentfa4d0361304f844f8536df0f826659e6ff54904d (diff)
downloadblackbird-obmc-linux-c7388ba1090255168aeec594a5b6fc7d7643ac4c.tar.gz
blackbird-obmc-linux-c7388ba1090255168aeec594a5b6fc7d7643ac4c.zip
serial: 8250_of: assume reg-shift of 2 for mrvl,mmp-uart
commit f4817843e39ce78aace0195a57d4e8500a65a898 upstream. There are two other drivers that bind to mrvl,mmp-uart and both of them assume register shift of 2 bits. There are device trees that lack the property and rely on that assumption. If this driver wins the race to bind to those devices, it should behave the same as the older deprecated driver. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/8250/8250_of.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_of.c b/drivers/tty/serial/8250/8250_of.c
index a1a85805d010..2488de1c4bc4 100644
--- a/drivers/tty/serial/8250/8250_of.c
+++ b/drivers/tty/serial/8250/8250_of.c
@@ -130,6 +130,10 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
port->flags |= UPF_IOREMAP;
}
+ /* Compatibility with the deprecated pxa driver and 8250_pxa drivers. */
+ if (of_device_is_compatible(np, "mrvl,mmp-uart"))
+ port->regshift = 2;
+
/* Check for registers offset within the devices address range */
if (of_property_read_u32(np, "reg-shift", &prop) == 0)
port->regshift = prop;
OpenPOWER on IntegriCloud