X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=target%2Flinux%2Flayerscape%2Fpatches-4.9%2F816-tty-serial-support-layerscape.patch;h=dd28ef6c04edac39d3be538d98b302787e9a5481;hb=9e1530b2a35e051664ed243efd1eac942883494a;hp=a14df9d70ec2e219210790daeaae269b618793c9;hpb=d2fdece2e17a756959e4ee1ae63e5de1c1b687ef;p=oweals%2Fopenwrt.git 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 a14df9d70e..dd28ef6c04 100644 --- 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 -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 an integrated patch for layerscape uart support. Signed-off-by: Nikita Yushchenko Signed-off-by: Yuan Yao @@ -117,12 +117,16 @@ Signed-off-by: Yangbo Lu } /* -@@ -1899,9 +1922,13 @@ static int lpuart_probe(struct platform_ +@@ -1899,13 +1922,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; +- } +- 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"); @@ -133,7 +137,7 @@ Signed-off-by: Yangbo Lu sport->port.line = ret; sport->lpuart32 = of_device_is_compatible(np, "fsl,ls1021a-lpuart"); -@@ -1983,6 +2010,7 @@ static int lpuart_remove(struct platform +@@ -1987,6 +2010,7 @@ static int lpuart_remove(struct platform struct lpuart_port *sport = platform_get_drvdata(pdev); uart_remove_one_port(&lpuart_reg, &sport->port); @@ -141,7 +145,7 @@ Signed-off-by: Yangbo Lu clk_disable_unprepare(sport->clk); -@@ -2067,12 +2095,10 @@ static int lpuart_resume(struct device * +@@ -2071,12 +2095,10 @@ static int lpuart_resume(struct device * if (sport->lpuart_dma_rx_use) { if (sport->port.irq_wake) {