.. | .. |
---|
31 | 31 | #include <linux/ioport.h> |
---|
32 | 32 | #include <linux/ktime.h> |
---|
33 | 33 | #include <linux/major.h> |
---|
| 34 | +#include <linux/minmax.h> |
---|
34 | 35 | #include <linux/module.h> |
---|
35 | 36 | #include <linux/mm.h> |
---|
36 | 37 | #include <linux/of.h> |
---|
.. | .. |
---|
2923 | 2924 | sci_port->irqs[i] = platform_get_irq(dev, i); |
---|
2924 | 2925 | } |
---|
2925 | 2926 | |
---|
| 2927 | + /* |
---|
| 2928 | + * The fourth interrupt on SCI port is transmit end interrupt, so |
---|
| 2929 | + * shuffle the interrupts. |
---|
| 2930 | + */ |
---|
| 2931 | + if (p->type == PORT_SCI) |
---|
| 2932 | + swap(sci_port->irqs[SCIx_BRI_IRQ], sci_port->irqs[SCIx_TEI_IRQ]); |
---|
| 2933 | + |
---|
2926 | 2934 | /* The SCI generates several interrupts. They can be muxed together or |
---|
2927 | 2935 | * connected to different interrupt lines. In the muxed case only one |
---|
2928 | 2936 | * interrupt resource is specified as there is only one interrupt ID. |
---|
.. | .. |
---|
2988 | 2996 | port->flags = UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags; |
---|
2989 | 2997 | port->fifosize = sci_port->params->fifosize; |
---|
2990 | 2998 | |
---|
2991 | | - if (port->type == PORT_SCI) { |
---|
| 2999 | + if (port->type == PORT_SCI && !dev->dev.of_node) { |
---|
2992 | 3000 | if (sci_port->reg_size >= 0x20) |
---|
2993 | 3001 | port->regshift = 2; |
---|
2994 | 3002 | else |
---|