diff options
author | John Audia <graysky@archlinux.us> | 2020-11-11 15:30:36 -0500 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-11-18 21:13:46 +0100 |
commit | 667f6c7f49c94213ca43a42ad5a9e23abfd81861 (patch) | |
tree | a16e6cc807cda32e1dfbaef1a0de486d5ba1166c /target/linux/layerscape/patches-5.4 | |
parent | 79f3f1358bf993a5d7ae14eba9cea2686b40841d (diff) | |
download | upstream-667f6c7f49c94213ca43a42ad5a9e23abfd81861.tar.gz upstream-667f6c7f49c94213ca43a42ad5a9e23abfd81861.tar.bz2 upstream-667f6c7f49c94213ca43a42ad5a9e23abfd81861.zip |
kernel: bump 5.4 to 5.4.77
Manually rebased patches:
bcm27xx/patches-5.4/950-0135-spi-spi-bcm2835-Disable-forced-software-CS.patch
generic-backport/744-v5.5-net-sfp-soft-status-and-control-support.patch
layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch
mvebu/patches-5.4/521-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch
Removed:
layerscape/patches-5.4/819-uart-0012-tty-serial-lpuart-add-LS1028A-support.patch
All modifications made by update_kernel.sh
Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
lantiq/Easybox 904 xDSL, x86_64
Run-tested: ipq806x/R7800, lantiq/Easybox 904 xDSL, x86_64
No dmesg regressions, everything functional
Signed-off-by: John Audia <graysky@archlinux.us>
Co-developed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/layerscape/patches-5.4')
14 files changed, 69 insertions, 130 deletions
diff --git a/target/linux/layerscape/patches-5.4/303-core-0002-drivers-base-add-sysfs-entries-for-suppliers-and-con.patch b/target/linux/layerscape/patches-5.4/303-core-0002-drivers-base-add-sysfs-entries-for-suppliers-and-con.patch index 1e45217307..6307ba839c 100644 --- a/target/linux/layerscape/patches-5.4/303-core-0002-drivers-base-add-sysfs-entries-for-suppliers-and-con.patch +++ b/target/linux/layerscape/patches-5.4/303-core-0002-drivers-base-add-sysfs-entries-for-suppliers-and-con.patch @@ -32,7 +32,7 @@ Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> + a specific device. --- a/drivers/base/core.c +++ b/drivers/base/core.c -@@ -1320,6 +1320,34 @@ static ssize_t online_store(struct devic +@@ -1318,6 +1318,34 @@ static ssize_t online_store(struct devic } static DEVICE_ATTR_RW(online); @@ -67,7 +67,7 @@ Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> int device_add_groups(struct device *dev, const struct attribute_group **groups) { return sysfs_create_groups(&dev->kobj, groups); -@@ -1491,8 +1519,20 @@ static int device_add_attrs(struct devic +@@ -1489,8 +1517,20 @@ static int device_add_attrs(struct devic goto err_remove_dev_groups; } @@ -88,7 +88,7 @@ Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> err_remove_dev_groups: device_remove_groups(dev, dev->groups); err_remove_type_groups: -@@ -1510,6 +1550,8 @@ static void device_remove_attrs(struct d +@@ -1508,6 +1548,8 @@ static void device_remove_attrs(struct d struct class *class = dev->class; const struct device_type *type = dev->type; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch index aa14f17500..ce93640b55 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch @@ -27,7 +27,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> #include <linux/serial_core.h> #include <linux/slab.h> #include <linux/tty_flip.h> -@@ -2367,6 +2369,54 @@ static struct uart_driver lpuart_reg = { +@@ -2391,6 +2393,54 @@ static struct uart_driver lpuart_reg = { .cons = LPUART_CONSOLE, }; @@ -82,7 +82,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> static int lpuart_probe(struct platform_device *pdev) { const struct of_device_id *of_id = of_match_device(lpuart_dt_ids, -@@ -2404,6 +2454,10 @@ static int lpuart_probe(struct platform_ +@@ -2428,6 +2478,10 @@ static int lpuart_probe(struct platform_ sport->port.rs485_config = lpuart_config_rs485; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch b/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch index 9f409a1fab..a287cd7f05 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0002-tty-serial-fsl_lpuart-add-modem-device-reset.patch @@ -20,7 +20,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> #include <linux/serial_core.h> #include <linux/slab.h> #include <linux/tty_flip.h> -@@ -1542,8 +1543,17 @@ static void lpuart32_configure(struct lp +@@ -1555,8 +1556,17 @@ static void lpuart32_configure(struct lp static int lpuart32_startup(struct uart_port *port) { struct lpuart_port *sport = container_of(port, struct lpuart_port, port); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch index bb94b02476..dc2ace7be2 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch @@ -12,7 +12,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -918,7 +918,12 @@ static void lpuart32_rxint(struct lpuart +@@ -931,7 +931,12 @@ static void lpuart32_rxint(struct lpuart */ sr = lpuart32_read(&sport->port, UARTSTAT); rx = lpuart32_read(&sport->port, UARTDATA); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch b/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch index aab529fc76..f3ff330281 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch @@ -17,7 +17,7 @@ Signed-off-by: Adriana Reus <adriana.reus@nxp.com> --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2452,7 +2452,7 @@ static int lpuart_probe(struct platform_ +@@ -2476,7 +2476,7 @@ static int lpuart_probe(struct platform_ return PTR_ERR(sport->port.membase); sport->port.membase += sdata->reg_off; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch index d4034bb9db..6edcc398d0 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch @@ -60,7 +60,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> /* Rx DMA timeout in ms, which is used to calculate Rx ring buffer size */ #define DMA_RX_TIMEOUT (10) -@@ -253,6 +260,9 @@ struct lpuart_port { +@@ -254,6 +261,9 @@ struct lpuart_port { unsigned int txfifo_size; unsigned int rxfifo_size; @@ -70,7 +70,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> bool lpuart_dma_tx_use; bool lpuart_dma_rx_use; struct dma_chan *dma_tx_chan; -@@ -278,28 +288,38 @@ struct lpuart_soc_data { +@@ -279,33 +289,45 @@ struct lpuart_soc_data { enum lpuart_type devtype; char iotype; u8 reg_off; @@ -85,13 +85,20 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> + .rx_dma_cyclic = true, }; - static const struct lpuart_soc_data ls_data = { + static const struct lpuart_soc_data ls1021a_data = { .devtype = LS1021A_LPUART, .iotype = UPIO_MEM32BE, + .rx_watermark = 0, + .rx_dma_cyclic = true, }; + static const struct lpuart_soc_data ls1028a_data = { + .devtype = LS1028A_LPUART, + .iotype = UPIO_MEM32, ++ .rx_watermark = 0, ++ .rx_dma_cyclic = true, + }; + static struct lpuart_soc_data imx7ulp_data = { .devtype = IMX7ULP_LPUART, .iotype = UPIO_MEM32, @@ -109,15 +116,15 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> }; static const struct of_device_id lpuart_dt_ids[] = { -@@ -313,6 +333,7 @@ MODULE_DEVICE_TABLE(of, lpuart_dt_ids); +@@ -320,6 +342,7 @@ MODULE_DEVICE_TABLE(of, lpuart_dt_ids); /* Forward declare this for the dma callbacks*/ static void lpuart_dma_tx_complete(void *arg); +static int lpuart_sched_rx_dma(struct lpuart_port *sport); - static inline bool is_imx8qxp_lpuart(struct lpuart_port *sport) + static inline bool is_layerscape_lpuart(struct lpuart_port *sport) { -@@ -998,19 +1019,15 @@ static irqreturn_t lpuart32_int(int irq, +@@ -1011,19 +1034,15 @@ static irqreturn_t lpuart32_int(int irq, if ((sts & UARTSTAT_TDRE) && !sport->lpuart_dma_tx_use) lpuart32_txint(sport); @@ -141,7 +148,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> if (lpuart_is_32(sport)) { unsigned long sr = lpuart32_read(&sport->port, UARTSTAT); -@@ -1062,8 +1079,21 @@ static void lpuart_copy_rx_to_tty(struct +@@ -1075,8 +1094,21 @@ static void lpuart_copy_rx_to_tty(struct writeb(cr2, sport->port.membase + UARTCR2); } } @@ -164,7 +171,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> spin_lock_irqsave(&sport->port.lock, flags); -@@ -1126,7 +1156,33 @@ static void lpuart_copy_rx_to_tty(struct +@@ -1139,7 +1171,33 @@ static void lpuart_copy_rx_to_tty(struct spin_unlock_irqrestore(&sport->port.lock, flags); tty_flip_buffer_push(port); @@ -199,7 +206,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> } static void lpuart_dma_rx_complete(void *arg) -@@ -1134,6 +1190,8 @@ static void lpuart_dma_rx_complete(void +@@ -1147,6 +1205,8 @@ static void lpuart_dma_rx_complete(void struct lpuart_port *sport = arg; lpuart_copy_rx_to_tty(sport); @@ -208,7 +215,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> } static void lpuart_timer_func(struct timer_list *t) -@@ -1141,13 +1199,78 @@ static void lpuart_timer_func(struct tim +@@ -1154,13 +1214,78 @@ static void lpuart_timer_func(struct tim struct lpuart_port *sport = from_timer(sport, t, lpuart_timer); lpuart_copy_rx_to_tty(sport); @@ -291,7 +298,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> int bits, baud; struct tty_port *port = &sport->port.state->port; struct tty_struct *tty = port->tty; -@@ -1167,6 +1290,18 @@ static inline int lpuart_start_rx_dma(st +@@ -1180,6 +1305,18 @@ static inline int lpuart_start_rx_dma(st sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1)); if (sport->rx_dma_rng_buf_len < 16) sport->rx_dma_rng_buf_len = 16; @@ -310,7 +317,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> ring->buf = kzalloc(sport->rx_dma_rng_buf_len, GFP_ATOMIC); if (!ring->buf) -@@ -1192,32 +1327,7 @@ static inline int lpuart_start_rx_dma(st +@@ -1205,32 +1342,7 @@ static inline int lpuart_start_rx_dma(st return ret; } @@ -344,7 +351,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> } static void lpuart_dma_rx_free(struct uart_port *port) -@@ -1403,8 +1513,10 @@ static void lpuart_setup_watermark(struc +@@ -1416,8 +1528,10 @@ static void lpuart_setup_watermark(struc writeb(UARTSFIFO_RXUF, sport->port.membase + UARTSFIFO); } @@ -356,7 +363,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> /* Restore cr2 */ writeb(cr2_saved, sport->port.membase + UARTCR2); -@@ -1425,6 +1537,7 @@ static void lpuart32_setup_watermark(str +@@ -1438,6 +1552,7 @@ static void lpuart32_setup_watermark(str { unsigned long val, ctrl; unsigned long ctrl_saved; @@ -364,7 +371,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> ctrl = lpuart32_read(&sport->port, UARTCTRL); ctrl_saved = ctrl; -@@ -1436,12 +1549,26 @@ static void lpuart32_setup_watermark(str +@@ -1449,12 +1564,26 @@ static void lpuart32_setup_watermark(str val = lpuart32_read(&sport->port, UARTFIFO); val |= UARTFIFO_TXFE | UARTFIFO_RXFE; val |= UARTFIFO_TXFLUSH | UARTFIFO_RXFLUSH; @@ -392,7 +399,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> /* Restore cr2 */ lpuart32_write(&sport->port, ctrl_saved, UARTCTRL); } -@@ -1453,17 +1580,29 @@ static void lpuart32_setup_watermark_ena +@@ -1466,17 +1595,29 @@ static void lpuart32_setup_watermark_ena lpuart32_setup_watermark(sport); temp = lpuart32_read(&sport->port, UARTCTRL); @@ -423,7 +430,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> static void lpuart_tx_dma_startup(struct lpuart_port *sport) { u32 uartbaud; -@@ -1527,19 +1666,23 @@ static int lpuart_startup(struct uart_po +@@ -1540,19 +1681,23 @@ static int lpuart_startup(struct uart_po return 0; } @@ -454,7 +461,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> if (!sport->lpuart_dma_tx_use) temp |= UARTCTRL_TIE; lpuart32_write(&sport->port, temp, UARTCTRL); -@@ -1572,12 +1715,12 @@ static int lpuart32_startup(struct uart_ +@@ -1596,12 +1741,12 @@ static int lpuart32_startup(struct uart_ spin_lock_irqsave(&sport->port.lock, flags); @@ -469,7 +476,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> lpuart32_configure(sport); spin_unlock_irqrestore(&sport->port.lock, flags); -@@ -1587,7 +1730,7 @@ static int lpuart32_startup(struct uart_ +@@ -1611,7 +1756,7 @@ static int lpuart32_startup(struct uart_ static void lpuart_dma_shutdown(struct lpuart_port *sport) { if (sport->lpuart_dma_rx_use) { @@ -478,7 +485,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> lpuart_dma_rx_free(&sport->port); } -@@ -1628,11 +1771,22 @@ static void lpuart32_shutdown(struct uar +@@ -1652,11 +1797,22 @@ static void lpuart32_shutdown(struct uar spin_lock_irqsave(&port->lock, flags); @@ -503,7 +510,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> spin_unlock_irqrestore(&port->lock, flags); -@@ -1729,10 +1883,10 @@ lpuart_set_termios(struct uart_port *por +@@ -1753,10 +1909,10 @@ lpuart_set_termios(struct uart_port *por * baud rate and restart Rx DMA path. * * Since timer function acqures sport->port.lock, need to stop before @@ -516,7 +523,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> lpuart_dma_rx_free(&sport->port); } -@@ -1944,10 +2098,10 @@ lpuart32_set_termios(struct uart_port *p +@@ -1968,10 +2124,10 @@ lpuart32_set_termios(struct uart_port *p * baud rate and restart Rx DMA path. * * Since timer function acqures sport->port.lock, need to stop before @@ -529,7 +536,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> lpuart_dma_rx_free(&sport->port); } -@@ -2456,6 +2610,10 @@ static int lpuart_probe(struct platform_ +@@ -2480,6 +2636,10 @@ static int lpuart_probe(struct platform_ sport->port.dev = &pdev->dev; sport->port.type = PORT_LPUART; sport->devtype = sdata->devtype; @@ -540,7 +547,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> ret = platform_get_irq(pdev, 0); if (ret < 0) return ret; -@@ -2618,7 +2776,7 @@ static int lpuart_suspend(struct device +@@ -2642,7 +2802,7 @@ static int lpuart_suspend(struct device * Rx DMA path before suspend and start Rx DMA path on resume. */ if (irq_wake) { diff --git a/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch b/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch index cfcb6e83fc..303aa3b011 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0006-tty-serial-fsl_lpuart-enable-loopback-mode.patch @@ -12,7 +12,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -1462,6 +1462,14 @@ static void lpuart32_set_mctrl(struct ua +@@ -1477,6 +1477,14 @@ static void lpuart32_set_mctrl(struct ua temp |= UARTMODIR_TXCTSE; lpuart32_write(port, temp, UARTMODIR); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0007-MLK-15094-tty-serial-fsl_lpuart-check-dma_tx_in_prog.patch b/target/linux/layerscape/patches-5.4/819-uart-0007-MLK-15094-tty-serial-fsl_lpuart-check-dma_tx_in_prog.patch index 58f44e86b0..41271f9dfd 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0007-MLK-15094-tty-serial-fsl_lpuart-check-dma_tx_in_prog.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0007-MLK-15094-tty-serial-fsl_lpuart-check-dma_tx_in_prog.patch @@ -16,7 +16,7 @@ Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com> --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -490,6 +490,10 @@ static void lpuart_dma_tx_complete(void +@@ -505,6 +505,10 @@ static void lpuart_dma_tx_complete(void unsigned long flags; spin_lock_irqsave(&sport->port.lock, flags); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch index edb0bd20cf..ab52567a3c 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch @@ -59,9 +59,9 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com> #define UARTFIFO_RXIDEN_RDRF 0x3 #define UARTCTRL_IDLECFG 0x7 -@@ -335,6 +345,11 @@ MODULE_DEVICE_TABLE(of, lpuart_dt_ids); - static void lpuart_dma_tx_complete(void *arg); - static int lpuart_sched_rx_dma(struct lpuart_port *sport); +@@ -350,6 +360,11 @@ static inline bool is_layerscape_lpuart( + sport->devtype == LS1028A_LPUART); + } +static inline bool is_imx7ulp_lpuart(struct lpuart_port *sport) +{ @@ -71,7 +71,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com> static inline bool is_imx8qxp_lpuart(struct lpuart_port *sport) { return sport->devtype == IMX8QXP_LPUART; -@@ -398,6 +413,33 @@ static unsigned int lpuart_get_baud_clk_ +@@ -413,6 +428,33 @@ static unsigned int lpuart_get_baud_clk_ #define lpuart_enable_clks(x) __lpuart_enable_clks(x, true) #define lpuart_disable_clks(x) __lpuart_enable_clks(x, false) @@ -105,7 +105,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com> static void lpuart_stop_tx(struct uart_port *port) { unsigned char temp; -@@ -2702,6 +2744,10 @@ static int lpuart_probe(struct platform_ +@@ -2728,6 +2770,10 @@ static int lpuart_probe(struct platform_ if (ret) goto failed_attach_port; @@ -116,7 +116,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com> uart_get_rs485_mode(&pdev->dev, &sport->port.rs485); if (sport->port.rs485.flags & SER_RS485_RX_DURING_TX) -@@ -2725,6 +2771,8 @@ static int lpuart_probe(struct platform_ +@@ -2751,6 +2797,8 @@ static int lpuart_probe(struct platform_ return 0; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch index 7021a6e3c7..d819f4790a 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch @@ -22,7 +22,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> #define DRIVER_NAME "fsl-lpuart" #define DEV_NAME "ttyLP" -@@ -844,6 +845,20 @@ static void lpuart32_start_tx(struct uar +@@ -859,6 +860,20 @@ static void lpuart32_start_tx(struct uar } } @@ -43,7 +43,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> /* return TIOCSER_TEMT when transmitter is not busy */ static unsigned int lpuart_tx_empty(struct uart_port *port) { -@@ -2257,6 +2272,7 @@ static const struct uart_ops lpuart_pops +@@ -2283,6 +2298,7 @@ static const struct uart_ops lpuart_pops .break_ctl = lpuart_break_ctl, .startup = lpuart_startup, .shutdown = lpuart_shutdown, @@ -51,7 +51,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> .set_termios = lpuart_set_termios, .type = lpuart_type, .request_port = lpuart_request_port, -@@ -2281,6 +2297,7 @@ static const struct uart_ops lpuart32_po +@@ -2307,6 +2323,7 @@ static const struct uart_ops lpuart32_po .break_ctl = lpuart32_break_ctl, .startup = lpuart32_startup, .shutdown = lpuart32_shutdown, @@ -59,7 +59,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> .set_termios = lpuart32_set_termios, .type = lpuart_type, .request_port = lpuart_request_port, -@@ -2740,6 +2757,11 @@ static int lpuart_probe(struct platform_ +@@ -2766,6 +2783,11 @@ static int lpuart_probe(struct platform_ if (ret) goto failed_irq_request; @@ -71,7 +71,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> ret = uart_add_one_port(&lpuart_reg, &sport->port); if (ret) goto failed_attach_port; -@@ -2774,6 +2796,9 @@ static int lpuart_probe(struct platform_ +@@ -2800,6 +2822,9 @@ static int lpuart_probe(struct platform_ failed_reset: uart_remove_one_port(&lpuart_reg, &sport->port); failed_attach_port: @@ -81,7 +81,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> failed_irq_request: lpuart_disable_clks(sport); failed_clock_enable: -@@ -2800,15 +2825,41 @@ static int lpuart_remove(struct platform +@@ -2826,15 +2851,41 @@ static int lpuart_remove(struct platform if (sport->dma_rx_chan) dma_release_channel(sport->dma_rx_chan); @@ -123,7 +123,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> if (lpuart_is_32(sport)) { /* disable Rx/Tx and interrupts */ -@@ -2822,10 +2873,14 @@ static int lpuart_suspend(struct device +@@ -2848,10 +2899,14 @@ static int lpuart_suspend(struct device writeb(temp, sport->port.membase + UARTCR2); } @@ -138,7 +138,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> if (sport->lpuart_dma_rx_use) { /* -@@ -2856,9 +2911,6 @@ static int lpuart_suspend(struct device +@@ -2882,9 +2937,6 @@ static int lpuart_suspend(struct device dmaengine_terminate_all(sport->dma_tx_chan); } @@ -148,7 +148,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> return 0; } -@@ -2866,9 +2918,11 @@ static int lpuart_resume(struct device * +@@ -2892,9 +2944,11 @@ static int lpuart_resume(struct device * { struct lpuart_port *sport = dev_get_drvdata(dev); bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq)); @@ -162,7 +162,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> if (lpuart_is_32(sport)) lpuart32_setup_watermark_enable(sport); -@@ -2889,13 +2943,23 @@ static int lpuart_resume(struct device * +@@ -2915,13 +2969,23 @@ static int lpuart_resume(struct device * if (lpuart_is_32(sport)) lpuart32_configure(sport); @@ -188,7 +188,7 @@ Reviewed-by: Robin Gong <yibin.gong@nxp.com> static struct platform_driver lpuart_driver = { .probe = lpuart_probe, -@@ -2903,7 +2967,7 @@ static struct platform_driver lpuart_dri +@@ -2929,7 +2993,7 @@ static struct platform_driver lpuart_dri .driver = { .name = "fsl-lpuart", .of_match_table = lpuart_dt_ids, diff --git a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch index 71c75584b8..69dc1b465a 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch @@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> #include <linux/pm_domain.h> #include <linux/pm_runtime.h> #include <linux/reset.h> -@@ -1707,10 +1708,23 @@ static void lpuart_rx_dma_startup(struct +@@ -1722,10 +1723,23 @@ static void lpuart_rx_dma_startup(struct } } @@ -53,7 +53,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> unsigned char temp; /* determine FIFO size and enable FIFO mode */ -@@ -1723,14 +1737,7 @@ static int lpuart_startup(struct uart_po +@@ -1738,14 +1752,7 @@ static int lpuart_startup(struct uart_po sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTPFIFO_RXSIZE_OFF) & UARTPFIFO_FIFOSIZE_MASK); @@ -69,7 +69,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> return 0; } -@@ -1757,11 +1764,27 @@ static void lpuart32_configure(struct lp +@@ -1772,11 +1779,27 @@ static void lpuart32_configure(struct lp lpuart32_write(&sport->port, temp, UARTCTRL); } @@ -98,9 +98,9 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> unsigned long temp; int ret; -@@ -1782,17 +1805,8 @@ static int lpuart32_startup(struct uart_ - sport->rxfifo_size = UARTFIFO_DEPTH((temp >> UARTFIFO_RXSIZE_OFF) & - UARTFIFO_FIFOSIZE_MASK); +@@ -1808,17 +1831,8 @@ static int lpuart32_startup(struct uart_ + sport->port.fifosize = sport->txfifo_size; + } - spin_lock_irqsave(&sport->port.lock, flags); - @@ -117,7 +117,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> return 0; } -@@ -2850,108 +2864,205 @@ static int lpuart_runtime_resume(struct +@@ -2876,108 +2890,205 @@ static int lpuart_runtime_resume(struct return lpuart_enable_clks(sport); }; diff --git a/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch b/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch index 3f92a1491e..2d4c14922a 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0011-serial-fsl_lpuart-enable-two-stop-bits.patch @@ -14,7 +14,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2109,11 +2109,12 @@ lpuart32_set_termios(struct uart_port *p +@@ -2135,11 +2135,12 @@ lpuart32_set_termios(struct uart_port *p { struct lpuart_port *sport = container_of(port, struct lpuart_port, port); unsigned long flags; @@ -28,7 +28,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> modem = lpuart32_read(&sport->port, UARTMODIR); /* * only support CS8 and CS7, and for CS7 must enable PE. -@@ -2150,7 +2151,9 @@ lpuart32_set_termios(struct uart_port *p +@@ -2176,7 +2177,9 @@ lpuart32_set_termios(struct uart_port *p } if (termios->c_cflag & CSTOPB) @@ -39,7 +39,7 @@ Signed-off-by: Fugang Duan <fugang.duan@nxp.com> /* parity must be enabled when CS7 to match 8-bits format */ if ((termios->c_cflag & CSIZE) == CS7) -@@ -2220,6 +2223,7 @@ lpuart32_set_termios(struct uart_port *p +@@ -2246,6 +2249,7 @@ lpuart32_set_termios(struct uart_port *p lpuart32_write(&sport->port, old_ctrl & ~(UARTCTRL_TE | UARTCTRL_RE), UARTCTRL); diff --git a/target/linux/layerscape/patches-5.4/819-uart-0012-tty-serial-lpuart-add-LS1028A-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0012-tty-serial-lpuart-add-LS1028A-support.patch deleted file mode 100644 index a4cb65cfec..0000000000 --- a/target/linux/layerscape/patches-5.4/819-uart-0012-tty-serial-lpuart-add-LS1028A-support.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 932dac0380bbf7276d4111c35674679bc9ad6384 Mon Sep 17 00:00:00 2001 -From: Vabhav Sharma <vabhav.sharma@nxp.com> -Date: Thu, 31 Oct 2019 19:20:47 +0530 -Subject: [PATCH] tty: serial: lpuart: add LS1028A support - -NXP LS1028A lpuart is the same IP as LS1021A, but it is -little endian for register accessing instead of big endian -on LS1021A. - -So add LS1028A matching data to distiguish the chips. - -Signed-off-by: Fugang Duan <fugang.duan@nxp.com> -Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com> -Acked-by: Fugang Duan <fugang.duan@nxp.com> ---- - drivers/tty/serial/fsl_lpuart.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - ---- a/drivers/tty/serial/fsl_lpuart.c -+++ b/drivers/tty/serial/fsl_lpuart.c -@@ -3,6 +3,7 @@ - * Freescale lpuart serial port driver - * - * Copyright 2012-2014 Freescale Semiconductor, Inc. -+ * Copyright 2019 NXP - */ - - #if defined(CONFIG_SERIAL_FSL_LPUART_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) -@@ -260,6 +261,7 @@ static DEFINE_IDA(fsl_lpuart_ida); - enum lpuart_type { - VF610_LPUART, - LS1021A_LPUART, -+ LS1028A_LPUART, - IMX7ULP_LPUART, - IMX8QXP_LPUART, - }; -@@ -311,13 +313,20 @@ static const struct lpuart_soc_data vf_d - .rx_dma_cyclic = true, - }; - --static const struct lpuart_soc_data ls_data = { -+static const struct lpuart_soc_data ls1021a_data = { - .devtype = LS1021A_LPUART, - .iotype = UPIO_MEM32BE, - .rx_watermark = 0, - .rx_dma_cyclic = true, - }; - -+static const struct lpuart_soc_data ls1028a_data = { -+ .devtype = LS1028A_LPUART, -+ .iotype = UPIO_MEM32, -+ .rx_watermark = 0, -+ .rx_dma_cyclic = true, -+}; -+ - static struct lpuart_soc_data imx7ulp_data = { - .devtype = IMX7ULP_LPUART, - .iotype = UPIO_MEM32, -@@ -336,7 +345,8 @@ static struct lpuart_soc_data imx8qxp_da - - static const struct of_device_id lpuart_dt_ids[] = { - { .compatible = "fsl,vf610-lpuart", .data = &vf_data, }, -- { .compatible = "fsl,ls1021a-lpuart", .data = &ls_data, }, -+ { .compatible = "fsl,ls1021a-lpuart", .data = &ls1021a_data, }, -+ { .compatible = "fsl,ls1028a-lpuart", .data = &ls1028a_data, }, - { .compatible = "fsl,imx7ulp-lpuart", .data = &imx7ulp_data, }, - { .compatible = "fsl,imx8qxp-lpuart", .data = &imx8qxp_data, }, - { /* sentinel */ } diff --git a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch index 125502ff9d..4223d1e2f2 100644 --- a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch +++ b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch @@ -24,7 +24,7 @@ Signed-off-by: Peng Fan <peng.fan@nxp.com> --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c -@@ -2598,7 +2598,9 @@ static int __init lpuart32_early_console +@@ -2614,7 +2614,9 @@ static int __init lpuart32_early_console if (!device->port.membase) return -ENODEV; |