From patchwork Tue Nov 17 08:14:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 324992 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BC31C63777 for ; Tue, 17 Nov 2020 08:14:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5D55241A5 for ; Tue, 17 Nov 2020 08:14:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727030AbgKQIOu convert rfc822-to-8bit (ORCPT ); Tue, 17 Nov 2020 03:14:50 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:59007 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725613AbgKQIOt (ORCPT ); Tue, 17 Nov 2020 03:14:49 -0500 Received: from [192.168.1.173] ([37.4.249.194]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MmDAW-1jwpwF0DUe-00iB5w; Tue, 17 Nov 2020 09:14:31 +0100 To: Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Fugang Duan From: Stefan Wahren Autocrypt: addr=stefan.wahren@i2se.com; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tClZlcnNpb246IEdudVBHIHYy CgptUUlOQk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pQNlV6M2lpCjJ1YTR1bnJ0Nk9D VHFRd2lqRi8zYlRXaXd2VkFBSG5NRlVpb1hzaEhhb2hWRGNWZm5lSU1mVjBiUUNYWWkzTnAK WTB2MFp3Y2lGSCtnU0M3cUQ2WE51aHBWR1NMNElpbGlGeS9TemNhSkV6QUhlTERTaFpQMkNX ZG5DNHZnbDM3dApocHg4aDU1WWhKbjZIU3VVelBnaGFLdFZCMmsrajdaZXlaK1NGeHA3SXVi SEN3TEhsUWhUNzVSd1EzaUF4S242CjBxajUxY1lUbnF4ZFpYVzZmSDNQa3VNellVNUdwcVIv MU9sNWMvd2ZJNmc2QW04eUtXLzBFVUx0K0tuNExGc1MKbTdZM201SDV2MTJVNkpCWXZWK3Ix M2paaW9zNEVFREU5M0Q1c05IMk1JeVJ6Q0RxMXpkZHQ0WHV5S0ZqUEtXMQo5aWJaRGZGVjdL dUNzdnVMMjNzQmMxc0NNb3ArRTFtVC9ReE9JQTZvRFQxTVFzdHdPVnVReURDdi9PdktTZ2Z6 CjhGWEdMNkFQY2xqQ3FqOEFKaHhReXN4ZG9pUVA4bS92dStialdHR3Z4dzVzMWxncGlSRFRS VVBnY0pKTmFHWTIKVklEclpRaTROU2lOUTBOSWkrZGp1NGZOTW1DcFFxZzh0YkMzY0FhNnl3 bTZvUUIxU0JobURYMmUxMWdSbGx1SQpPblRHUEUwSFRvM2w3MmxoYmc9PQo9cVpNVgotLS0t LUVORCBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCg== Cc: linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: BUG: imx: initial UART receive causes IO errors Message-ID: <9c7f63b8-7c7c-2bc3-eef7-1301c0590901@i2se.com> Date: Tue, 17 Nov 2020 09:14:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 Content-Language: en-US X-Provags-ID: V03:K1:17kgrnPMZOQpwR8N0FWmNXuIpzsjTkQqyKsG4Z5z2GsRXuuFHA5 FIrj+eQ82sU8zP6rqjSoyvCqp8aL+mxF92hc+fffmDom2BBzLveVyLoKkFB7jXWRMHyoVFb D9787WAL4E2UHtpywh/lN/mxf9YPSOfEiNnJYrZaAfz8SssMnrC7Ab/QJiXkQ+T85U5IFxS Gbe30rrFHYW3kGf84sUYQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:G1vNPKnp3zo=:Sp7X+/v3Nzixy4T885i8rH 2Je0C2FTxfWFkDshA0pkWf3NJXFSC4bQIE0YfS/pntoITgVhF658zqIMh/YcOhUuzoQZNDLCQ VhQ8nsK+yopIjIhtZG2PCABffc3TJp/gSXUUT6gewkc80mq6ifvbeJqObg+PfeqnhMe3oMvQZ gLNtuhBL1d8disideaTcDxdfECLFA7ZQ8nFigyezXeCOV839DqCMgRWd+J7cYxtvFpGQeBhFG 9egr82FcweTGV/oY4l2AWQI/5u6xQm9K67NtQZ9RcDokzXVYiIflzbzZ3o4NMNsxy5WtG83V+ p2Dsy3X24k3BBypC6Aj/8pZruUONE8vKKbZ7YAHK//UBC/OhrN8dNJdfXDI/ZjedGtSpF5JM4 cKWytdrCLNUpNaWMoe7kr13NCaIHAjIAYXfuAnoCb+6axXDMfjgHX7fiwHk9y/PqOxvd/cQkN OD6xXiJi1A== Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Hi, we are using a Modbus application on our customer i.MX6ULL board (RS-485 in hardware, no DMA). While porting the board support package to a Mainline kernel, we noticed that after boot the initial UART receive causes IO errors, which breaks our application (tested with Mainline 4.9, 4.19, 5.7, 5.9 but without success). The ancient vendor kernel (imx-4.9.11) we are still using isn't affect by this issue. So i bisected the vendor tree and found this huge patch which fixed the issue [1]. After that i was able to narrow down the fix to the following patch against Mainline Linux 5.9 (successful tested on i.MX6ULL):   @@ -1415,6 +1416,7 @@ static int imx_uart_startup(struct uart_port *port)      unsigned long flags;      int dma_is_inited = 0;      u32 ucr1, ucr2, ucr3, ucr4; +    unsigned char rx_fifo_trig;        retval = clk_prepare_enable(sport->clk_per);      if (retval) @@ -1425,7 +1427,12 @@ static int imx_uart_startup(struct uart_port *port)          return retval;      }   -    imx_uart_setup_ufcr(sport, TXTL_DEFAULT, RXTL_DEFAULT); +    if (uart_console(&sport->port)) +        rx_fifo_trig = RXTL_DEFAULT; +    else +        rx_fifo_trig = RXTL_UART; + +    imx_uart_setup_ufcr(sport, TXTL_DEFAULT, rx_fifo_trig);        /* disable the DREN bit (Data Ready interrupt enable) before       * requesting IRQs @@ -1674,7 +1681,7 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios,       * except those we will or may need to preserve.       */      old_ucr2 = imx_uart_readl(sport, UCR2); -    ucr2 = old_ucr2 & (UCR2_TXEN | UCR2_RXEN | UCR2_ATEN | UCR2_CTS); +    ucr2 = old_ucr2 & (UCR2_TXEN | UCR2_RXEN | UCR2_CTS);        ucr2 |= UCR2_SRST | UCR2_IRTS;      if ((termios->c_cflag & CSIZE) == CS8) @@ -1795,6 +1802,9 @@ imx_uart_set_termios(struct uart_port *port, struct ktermios *termios,      if (UART_ENABLE_MS(&sport->port, termios->c_cflag))          imx_uart_enable_ms(&sport->port);   +    ucr2 = imx_uart_readl(sport, UCR2); +    imx_uart_writel(sport, ucr2 | UCR2_ATEN, UCR2); +      spin_unlock_irqrestore(&sport->port.lock, flags);  } So i someone with a deeper insight can fix this properly. Thanks Stefan [1] - https://source.codeaurora.org/external/imx/linux-imx/commit/drivers/tty/serial/imx.c?h=imx_4.9.11_1.0.0_ga&id=e287334648e0a0f6a76f3d9615eada6cd590cbd9 diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 07974f2..3004b5c 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1289,6 +1289,7 @@ static void imx_uart_clear_rx_errors(struct imx_port *sport)    #define TXTL_DEFAULT 2 /* reset default */  #define RXTL_DEFAULT 1 /* reset default */ +#define RXTL_UART 16 /* For UART */  #define TXTL_DMA 8 /* DMA burst setting */  #define RXTL_DMA 9 /* DMA burst setting */