diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-10 08:51:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-10 08:51:09 +0200 |
commit | 039535ecf18e8dc93fe4b294fdf175a31bd023b2 (patch) | |
tree | 4a70d5db5ba3f1c0fdb1e7dc29f16fa7ace044c4 /drivers/tty/serial/sh-sci.c | |
parent | b2ea273a477cd6e83daedbfa1981cd1a7468f73a (diff) | |
parent | 09a9639e56c01c7a00d6c0ca63f4c7c41abe075d (diff) | |
download | linux-stable-039535ecf18e8dc93fe4b294fdf175a31bd023b2.tar.gz linux-stable-039535ecf18e8dc93fe4b294fdf175a31bd023b2.tar.bz2 linux-stable-039535ecf18e8dc93fe4b294fdf175a31bd023b2.zip |
Merge 6.3-rc6 into tty-next
We need the tty/serial fixes in here for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r-- | drivers/tty/serial/sh-sci.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 027dfe535fe5..ca31e34afd83 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -31,6 +31,7 @@ #include <linux/ioport.h> #include <linux/ktime.h> #include <linux/major.h> +#include <linux/minmax.h> #include <linux/module.h> #include <linux/mm.h> #include <linux/of.h> @@ -2861,6 +2862,13 @@ static int sci_init_single(struct platform_device *dev, sci_port->irqs[i] = platform_get_irq(dev, i); } + /* + * The fourth interrupt on SCI port is transmit end interrupt, so + * shuffle the interrupts. + */ + if (p->type == PORT_SCI) + swap(sci_port->irqs[SCIx_BRI_IRQ], sci_port->irqs[SCIx_TEI_IRQ]); + /* The SCI generates several interrupts. They can be muxed together or * connected to different interrupt lines. In the muxed case only one * interrupt resource is specified as there is only one interrupt ID. @@ -2926,7 +2934,7 @@ static int sci_init_single(struct platform_device *dev, port->flags = UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags; port->fifosize = sci_port->params->fifosize; - if (port->type == PORT_SCI) { + if (port->type == PORT_SCI && !dev->dev.of_node) { if (sci_port->reg_size >= 0x20) port->regshift = 2; else |