summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Rossi <nathan.rossi@xilinx.com>2014-11-24 16:41:09 +1000
committerNathan Rossi <nathan.rossi@xilinx.com>2014-11-26 14:10:39 +1000
commit18fdd1ff7ddc3c8839e565916c25eefde9181b6d (patch)
treef0c8e7c28ee2c53f4397130b613aaad7dc54b404
parent359c044b146bfacefcee5f5a9a9ba7aed4453800 (diff)
downloadmeta-xilinx-18fdd1ff7ddc3c8839e565916c25eefde9181b6d.tar.gz
linux-*: Add patch to resolve Zynq UART lockup issue
* The xuartps/cdns_uart driver has a hang condition during the boot of the kernel. The lock-up itself occurs during the set_termios call when there is data received in the RX FIFO before the first setup of the console device. Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
-rw-r--r--recipes-kernel/linux/linux-xlnx/3.10/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch33
-rw-r--r--recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch32
-rw-r--r--recipes-kernel/linux/linux-xlnx/3.17/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch34
-rw-r--r--recipes-kernel/linux/linux-xlnx_3.10.bb5
-rw-r--r--recipes-kernel/linux/linux-xlnx_3.14.bb2
-rw-r--r--recipes-kernel/linux/linux-yocto/3.10/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch34
-rw-r--r--recipes-kernel/linux/linux-yocto_3.10.bbappend4
-rw-r--r--recipes-kernel/linux/linux-yocto_3.14.bbappend5
-rw-r--r--recipes-kernel/linux/linux-yocto_3.17.bbappend5
9 files changed, 154 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-xlnx/3.10/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch b/recipes-kernel/linux/linux-xlnx/3.10/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
new file mode 100644
index 00000000..4ecd4e48
--- /dev/null
+++ b/recipes-kernel/linux/linux-xlnx/3.10/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
@@ -0,0 +1,33 @@
1From c2a532266240230c5b49e56f1035e9ba27a61d96 Mon Sep 17 00:00:00 2001
2From: Nathan Rossi <nathan.rossi@xilinx.com>
3Date: Mon, 24 Nov 2014 15:11:43 +1000
4Subject: [PATCH] tty: xuartps: Fix RX hang, and TX corruption in set_termios
5
6Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
7---
8 drivers/tty/serial/xilinx_uartps.c | 9 +++++----
9 1 file changed, 5 insertions(+), 4 deletions(-)
10
11diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
12index faf2d90..7c842f2 100644
13--- a/drivers/tty/serial/xilinx_uartps.c
14+++ b/drivers/tty/serial/xilinx_uartps.c
15@@ -642,10 +642,11 @@ static void xuartps_set_termios(struct uart_port *port,
16
17 spin_lock_irqsave(&port->lock, flags);
18
19- /* Empty the receive FIFO 1st before making changes */
20- while ((xuartps_readl(XUARTPS_SR_OFFSET) &
21- XUARTPS_SR_RXEMPTY) != XUARTPS_SR_RXEMPTY)
22- xuartps_readl(XUARTPS_FIFO_OFFSET);
23+ /* Wait for the transmit FIFO to empty before making changes */
24+ if (!(xuartps_readl(XUARTPS_CR_OFFSET) & XUARTPS_CR_TX_DIS)) {
25+ while (!(xuartps_readl(XUARTPS_SR_OFFSET) & XUARTPS_SR_TXEMPTY))
26+ cpu_relax();
27+ }
28
29 /* Disable the TX and RX to set baud rate */
30 xuartps_writel(xuartps_readl(XUARTPS_CR_OFFSET) |
31--
322.1.1
33
diff --git a/recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch b/recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
new file mode 100644
index 00000000..bafd4332
--- /dev/null
+++ b/recipes-kernel/linux/linux-xlnx/3.14/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
@@ -0,0 +1,32 @@
1From 397b08fb903994ccaa2d4d7f4cf578c9d3028463 Mon Sep 17 00:00:00 2001
2From: Nathan Rossi <nathan.rossi@xilinx.com>
3Date: Mon, 24 Nov 2014 15:11:43 +1000
4Subject: [PATCH] tty: xuartps: Fix RX hang, and TX corruption in set_termios
5
6Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
7---
8 drivers/tty/serial/xilinx_uartps.c | 8 ++++----
9 1 file changed, 4 insertions(+), 4 deletions(-)
10
11diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
12index dbbc195..fcb1c50 100644
13--- a/drivers/tty/serial/xilinx_uartps.c
14+++ b/drivers/tty/serial/xilinx_uartps.c
15@@ -648,10 +648,10 @@ static void xuartps_set_termios(struct uart_port *port,
16
17 spin_lock_irqsave(&port->lock, flags);
18
19- /* Empty the receive FIFO 1st before making changes */
20- while ((xuartps_readl(XUARTPS_SR_OFFSET) &
21- XUARTPS_SR_RXEMPTY) != XUARTPS_SR_RXEMPTY) {
22- xuartps_readl(XUARTPS_FIFO_OFFSET);
23+ /* Wait for the transmit FIFO to empty before making changes */
24+ if (!(xuartps_readl(XUARTPS_CR_OFFSET) & XUARTPS_CR_TX_DIS)) {
25+ while (!(xuartps_readl(XUARTPS_SR_OFFSET) & XUARTPS_SR_TXEMPTY))
26+ cpu_relax();
27 }
28
29 /* Disable the TX and RX to set baud rate */
30--
312.1.1
32
diff --git a/recipes-kernel/linux/linux-xlnx/3.17/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch b/recipes-kernel/linux/linux-xlnx/3.17/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
new file mode 100644
index 00000000..4ac6624d
--- /dev/null
+++ b/recipes-kernel/linux/linux-xlnx/3.17/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
@@ -0,0 +1,34 @@
1From c3181f01d21953bff9971e141a193c445099e90f Mon Sep 17 00:00:00 2001
2From: Nathan Rossi <nathan.rossi@xilinx.com>
3Date: Mon, 24 Nov 2014 15:11:43 +1000
4Subject: [PATCH] tty: xuartps: Fix RX hang, and TX corruption in set_termios
5
6Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
7---
8 drivers/tty/serial/xilinx_uartps.c | 10 ++++++----
9 1 file changed, 6 insertions(+), 4 deletions(-)
10
11diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
12index 7f8027f..74dd5c9 100644
13--- a/drivers/tty/serial/xilinx_uartps.c
14+++ b/drivers/tty/serial/xilinx_uartps.c
15@@ -628,10 +628,12 @@ static void cdns_uart_set_termios(struct uart_port *port,
16
17 spin_lock_irqsave(&port->lock, flags);
18
19- /* Empty the receive FIFO 1st before making changes */
20- while ((cdns_uart_readl(CDNS_UART_SR_OFFSET) &
21- CDNS_UART_SR_RXEMPTY) != CDNS_UART_SR_RXEMPTY) {
22- cdns_uart_readl(CDNS_UART_FIFO_OFFSET);
23+ /* Wait for the transmit FIFO to empty before making changes */
24+ if (!(cdns_uart_readl(CDNS_UART_CR_OFFSET) & CDNS_UART_CR_TX_DIS)) {
25+ while (!(cdns_uart_readl(CDNS_UART_SR_OFFSET) &
26+ CDNS_UART_SR_TXEMPTY)) {
27+ cpu_relax();
28+ }
29 }
30
31 /* Disable the TX and RX to set baud rate */
32--
332.1.1
34
diff --git a/recipes-kernel/linux/linux-xlnx_3.10.bb b/recipes-kernel/linux/linux-xlnx_3.10.bb
index 8edd4d71..d32c4241 100644
--- a/recipes-kernel/linux/linux-xlnx_3.10.bb
+++ b/recipes-kernel/linux/linux-xlnx_3.10.bb
@@ -9,3 +9,8 @@ include linux-xlnx.inc
9# The MACB driver is non-functional in the 3.10 kernel 9# The MACB driver is non-functional in the 3.10 kernel
10KERNEL_FEATURES_append_zynq += "features/xilinx/disable-macb.scc" 10KERNEL_FEATURES_append_zynq += "features/xilinx/disable-macb.scc"
11 11
12FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx/3.10:"
13SRC_URI_append += " \
14 file://tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch \
15 "
16
diff --git a/recipes-kernel/linux/linux-xlnx_3.14.bb b/recipes-kernel/linux/linux-xlnx_3.14.bb
index d33b3a58..4a31ccff 100644
--- a/recipes-kernel/linux/linux-xlnx_3.14.bb
+++ b/recipes-kernel/linux/linux-xlnx_3.14.bb
@@ -8,4 +8,6 @@ include linux-xlnx.inc
8FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx/3.14:" 8FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx/3.14:"
9SRC_URI_append += " \ 9SRC_URI_append += " \
10 file://usb-host-zynq-dr-of-PHY-reset-during-probe.patch \ 10 file://usb-host-zynq-dr-of-PHY-reset-during-probe.patch \
11 file://tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch \
11 " 12 "
13
diff --git a/recipes-kernel/linux/linux-yocto/3.10/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch b/recipes-kernel/linux/linux-yocto/3.10/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
new file mode 100644
index 00000000..ea6bbe6b
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/3.10/tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch
@@ -0,0 +1,34 @@
1From 4cbf3473ca25ac47d2d1e43113afce961d057b87 Mon Sep 17 00:00:00 2001
2From: Nathan Rossi <nathan.rossi@xilinx.com>
3Date: Mon, 24 Nov 2014 15:11:43 +1000
4Subject: [PATCH] tty: xuartps: Fix RX hang, and TX corruption in set_termios
5
6Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
7---
8 drivers/tty/serial/xilinx_uartps.c | 10 ++++++----
9 1 file changed, 6 insertions(+), 4 deletions(-)
10
11diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
12index e46e9f3..eb00754 100644
13--- a/drivers/tty/serial/xilinx_uartps.c
14+++ b/drivers/tty/serial/xilinx_uartps.c
15@@ -646,10 +646,12 @@ static void xuartps_set_termios(struct uart_port *port,
16
17 spin_lock_irqsave(&port->lock, flags);
18
19- /* Empty the receive FIFO 1st before making changes */
20- while ((xuartps_readl(XUARTPS_SR_OFFSET) &
21- XUARTPS_SR_RXEMPTY) != XUARTPS_SR_RXEMPTY) {
22- xuartps_readl(XUARTPS_FIFO_OFFSET);
23+ /* Wait for the transmit FIFO to empty before making changes */
24+ if (!(xuartps_readl(XUARTPS_CR_OFFSET) & XUARTPS_CR_TX_DIS)) {
25+ while (!(xuartps_readl(XUARTPS_SR_OFFSET) &
26+ XUARTPS_SR_TXEMPTY)) {
27+ cpu_relax();
28+ }
29 }
30
31 /* Disable the TX and RX to set baud rate */
32--
332.1.1
34
diff --git a/recipes-kernel/linux/linux-yocto_3.10.bbappend b/recipes-kernel/linux/linux-yocto_3.10.bbappend
index 5bc61056..1ddb2978 100644
--- a/recipes-kernel/linux/linux-yocto_3.10.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.10.bbappend
@@ -12,3 +12,7 @@ SRC_URI_append_microblaze += " \
12 file://7f15a256b556bf26780d7a0bd03c88914a852022.patch \ 12 file://7f15a256b556bf26780d7a0bd03c88914a852022.patch \
13 file://99399545d62533b4ae742190b5c6b11f7a5826d9.patch \ 13 file://99399545d62533b4ae742190b5c6b11f7a5826d9.patch \
14 " 14 "
15SRC_URI_append_zynq += " \
16 file://tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch \
17 "
18
diff --git a/recipes-kernel/linux/linux-yocto_3.14.bbappend b/recipes-kernel/linux/linux-yocto_3.14.bbappend
index 651e0d72..944ff63b 100644
--- a/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.14.bbappend
@@ -2,3 +2,8 @@
2require linux-xilinx-configs.inc 2require linux-xilinx-configs.inc
3require linux-xilinx-machines.inc 3require linux-xilinx-machines.inc
4 4
5FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx/3.14:"
6SRC_URI_append_zynq += " \
7 file://tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch \
8 "
9
diff --git a/recipes-kernel/linux/linux-yocto_3.17.bbappend b/recipes-kernel/linux/linux-yocto_3.17.bbappend
index 651e0d72..f62d2ddc 100644
--- a/recipes-kernel/linux/linux-yocto_3.17.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.17.bbappend
@@ -2,3 +2,8 @@
2require linux-xilinx-configs.inc 2require linux-xilinx-configs.inc
3require linux-xilinx-machines.inc 3require linux-xilinx-machines.inc
4 4
5FILESEXTRAPATHS_prepend := "${THISDIR}/linux-xlnx/3.17:"
6SRC_URI_append_zynq += " \
7 file://tty-xuartps-Fix-RX-hang-and-TX-corruption-in-set_termios.patch \
8 "
9