projects
/
openwrt
/
staging
/
chunkeey.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kernel: bump 4.9 to 4.9.131
[openwrt/staging/chunkeey.git]
/
target
/
linux
/
layerscape
/
patches-4.9
/
816-tty-serial-support-layerscape.patch
diff --git
a/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch
b/target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch
index 3e0d30f61d971dfd9e4dbf97a3c2f8e79bdf57e4..3271563f7f4f1310662111c0e02de36fc4afdc60 100644
(file)
--- a/
target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch
+++ b/
target/linux/layerscape/patches-4.9/816-tty-serial-support-layerscape.patch
@@
-1,9
+1,9
@@
-From
469daac0faff06209bc1d1390571b860d153a82b
Mon Sep 17 00:00:00 2001
+From
c35aec61e5bb0faafb2847a0d750ebd7345a4b0f
Mon Sep 17 00:00:00 2001
From: Yangbo Lu <yangbo.lu@nxp.com>
From: Yangbo Lu <yangbo.lu@nxp.com>
-Date: Wed,
27 Sep 2017 10:33:47
+0800
-Subject: [PATCH] tty: serial: support layerscape
+Date: Wed,
17 Jan 2018 15:40:24
+0800
+Subject: [PATCH
28/30
] tty: serial: support layerscape
-This is a integrated patch for layerscape uart support.
+This is a
n
integrated patch for layerscape uart support.
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Signed-off-by: Yuan Yao <yao.yuan@nxp.com>
@@
-13,8
+13,6
@@
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
drivers/tty/serial/fsl_lpuart.c | 66 ++++++++++++++++++++++++++++-------------
1 file changed, 46 insertions(+), 20 deletions(-)
drivers/tty/serial/fsl_lpuart.c | 66 ++++++++++++++++++++++++++++-------------
1 file changed, 46 insertions(+), 20 deletions(-)
-diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
-index 76103f2c..61453820 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -231,6 +231,8 @@
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -231,6 +231,8 @@
@@
-26,7
+24,7
@@
index 76103f2c..61453820 100644
struct lpuart_port {
struct uart_port port;
struct clk *clk;
struct lpuart_port {
struct uart_port port;
struct clk *clk;
-@@ -134
8,6 +1350,18 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -134
9,6 +1351,18 @@ lpuart_set_termios(struct uart_port *por
/* ask the core to calculate the divisor */
baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16);
/* ask the core to calculate the divisor */
baud = uart_get_baud_rate(port, termios, old, 50, port->uartclk / 16);
@@
-45,7
+43,7
@@
index 76103f2c..61453820 100644
spin_lock_irqsave(&sport->port.lock, flags);
sport->port.read_status_mask = 0;
spin_lock_irqsave(&sport->port.lock, flags);
sport->port.read_status_mask = 0;
-@@ -139
7,22 +1411,11 @@ lpuart_set_termios(struct uart_port *port, struct ktermios *termios,
+@@ -139
8,22 +1412,11 @@ lpuart_set_termios(struct uart_port *por
/* restore control register */
writeb(old_cr2, sport->port.membase + UARTCR2);
/* restore control register */
writeb(old_cr2, sport->port.membase + UARTCR2);
@@
-71,7
+69,7
@@
index 76103f2c..61453820 100644
}
spin_unlock_irqrestore(&sport->port.lock, flags);
}
spin_unlock_irqrestore(&sport->port.lock, flags);
-@@ -164
0,6 +1643,13 @@ lpuart_console_write(struct console *co, const char *s, unsigned int count)
+@@ -164
1,6 +1644,13 @@ lpuart_console_write(struct console *co,
{
struct lpuart_port *sport = lpuart_ports[co->index];
unsigned char old_cr2, cr2;
{
struct lpuart_port *sport = lpuart_ports[co->index];
unsigned char old_cr2, cr2;
@@
-85,7
+83,7
@@
index 76103f2c..61453820 100644
/* first save CR2 and then disable interrupts */
cr2 = old_cr2 = readb(sport->port.membase + UARTCR2);
/* first save CR2 and then disable interrupts */
cr2 = old_cr2 = readb(sport->port.membase + UARTCR2);
-@@ -165
4,6 +1664,9 @@ lpuart_console_write(struct console *co, const char *s, unsigned int count)
+@@ -165
5,6 +1665,9 @@ lpuart_console_write(struct console *co,
barrier();
writeb(old_cr2, sport->port.membase + UARTCR2);
barrier();
writeb(old_cr2, sport->port.membase + UARTCR2);
@@
-95,7
+93,7
@@
index 76103f2c..61453820 100644
}
static void
}
static void
-@@ -166
1,6 +1674,13 @@ lpuart32_console_write(struct console *co, const char *s, unsigned int count)
+@@ -166
2,6 +1675,13 @@ lpuart32_console_write(struct console *c
{
struct lpuart_port *sport = lpuart_ports[co->index];
unsigned long old_cr, cr;
{
struct lpuart_port *sport = lpuart_ports[co->index];
unsigned long old_cr, cr;
@@
-109,7
+107,7
@@
index 76103f2c..61453820 100644
/* first save CR2 and then disable interrupts */
cr = old_cr = lpuart32_read(sport->port.membase + UARTCTRL);
/* first save CR2 and then disable interrupts */
cr = old_cr = lpuart32_read(sport->port.membase + UARTCTRL);
-@@ -167
5,6 +1695,9 @@ lpuart32_console_write(struct console *co, const char *s, unsigned int count)
+@@ -167
6,6 +1696,9 @@ lpuart32_console_write(struct console *c
barrier();
lpuart32_write(old_cr, sport->port.membase + UARTCTRL);
barrier();
lpuart32_write(old_cr, sport->port.membase + UARTCTRL);
@@
-119,12
+117,16
@@
index 76103f2c..61453820 100644
}
/*
}
/*
-@@ -1
899,9 +1922,13 @@ static int lpuart_probe(struct platform_device *pdev)
+@@ -1
900,13 +1923,13 @@ static int lpuart_probe(struct platform_
ret = of_alias_get_id(np, "serial");
if (ret < 0) {
- dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret);
- return ret;
ret = of_alias_get_id(np, "serial");
if (ret < 0) {
- dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret);
- return ret;
+- }
+- if (ret >= ARRAY_SIZE(lpuart_ports)) {
+- dev_err(&pdev->dev, "serial%d out of range\n", ret);
+- return -EINVAL;
+ ret = find_first_zero_bit(linemap, UART_NR);
+ if (ret >= UART_NR) {
+ dev_err(&pdev->dev, "port line is full, add device failed\n");
+ ret = find_first_zero_bit(linemap, UART_NR);
+ if (ret >= UART_NR) {
+ dev_err(&pdev->dev, "port line is full, add device failed\n");
@@
-135,7
+137,7
@@
index 76103f2c..61453820 100644
sport->port.line = ret;
sport->lpuart32 = of_device_is_compatible(np, "fsl,ls1021a-lpuart");
sport->port.line = ret;
sport->lpuart32 = of_device_is_compatible(np, "fsl,ls1021a-lpuart");
-@@ -198
3,6 +2010,7 @@ static int lpuart_remove(struct platform_device *pdev)
+@@ -198
8,6 +2011,7 @@ static int lpuart_remove(struct platform
struct lpuart_port *sport = platform_get_drvdata(pdev);
uart_remove_one_port(&lpuart_reg, &sport->port);
struct lpuart_port *sport = platform_get_drvdata(pdev);
uart_remove_one_port(&lpuart_reg, &sport->port);
@@
-143,7
+145,7
@@
index 76103f2c..61453820 100644
clk_disable_unprepare(sport->clk);
clk_disable_unprepare(sport->clk);
-@@ -20
67,12 +2095,10 @@ static int lpuart_resume(struct device *dev)
+@@ -20
72,12 +2096,10 @@ static int lpuart_resume(struct device *
if (sport->lpuart_dma_rx_use) {
if (sport->port.irq_wake) {
if (sport->lpuart_dma_rx_use) {
if (sport->port.irq_wake) {
@@
-158,6
+160,3
@@
index 76103f2c..61453820 100644
}
}
}
}
---
-2.14.1
-