From patchwork Wed Apr 18 09:11:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 10347625 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 432006053F for ; Wed, 18 Apr 2018 09:11:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36FA2285CC for ; Wed, 18 Apr 2018 09:11:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2959D285D1; Wed, 18 Apr 2018 09:11:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77EEF285CC for ; Wed, 18 Apr 2018 09:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752308AbeDRJLX (ORCPT ); Wed, 18 Apr 2018 05:11:23 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:46045 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751870AbeDRJLW (ORCPT ); Wed, 18 Apr 2018 05:11:22 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3I9AxVJ017353; Wed, 18 Apr 2018 04:10:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524042659; bh=u7ec2/dI7YtIt1Ss2hX5BDCILOZltY+qzd2bwwwGGjw=; h=Subject:From:To:CC:References:Date:In-Reply-To; b=A/Kf2F9PJ0tZBXdobffZjp/8RnmNWtO0fcPICGmAkjwrGATa4Ca030iJCuWIBFovT YR+DTeQeXEI2QCRrW1IrZlWi3stStZMDpCRrUS3R18EmvOJTIRnJA4cf3H13iNcW4w 2TUNbMyGtHGdH0RtWSmfxuaIH0nk5/y3W/WQUCrk= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3I9AxEn019797; Wed, 18 Apr 2018 04:10:59 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 18 Apr 2018 04:10:59 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 18 Apr 2018 04:10:59 -0500 Received: from [172.24.190.89] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3I9Aurk028185; Wed, 18 Apr 2018 04:10:57 -0500 Subject: Re: 4.16 OMAP serial transmit corruption? From: Vignesh R To: Tony Lindgren , Russell King - ARM Linux CC: Greg Kroah-Hartman , , , References: <20180416151732.GU16141@n2100.armlinux.org.uk> <20180416154545.GA5671@atomide.com> <413b774b-d19f-3221-44d5-7992d3b8757f@ti.com> Message-ID: Date: Wed, 18 Apr 2018 14:41:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <413b774b-d19f-3221-44d5-7992d3b8757f@ti.com> Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tuesday 17 April 2018 02:50 PM, Vignesh R wrote: > > > On Monday 16 April 2018 09:15 PM, Tony Lindgren wrote: >> * Russell King - ARM Linux [180416 15:19]: >>> Hi, >>> >>> I'm not entirely sure what's going on, but I see corrupted characters >>> with the serial console on the OMAP4430 SDP board. During boot, >>> everything seems fine, the problem appears to be userspace output. >>> >>> For example, if I edit a file, then quit vi: >>> >>> :q■■%■■B■■Z■root@omap-4430sdp:~# >> >> I don't think I've seen that one. What I've seen few times is >> typing a key on the serial console echoing back the previous >> character typed while the new character won't get displayed >> until hitting keyboard again. Only rebooting the device seems >> to solve this. This is with 4430 ES2.3 revision. >> >> I wonder if we're missing some parts of errata i202 handling >> in omap_8250_mdr1_errataset()? >> I wonder if the extra read of MDR1 register at the beginning of omap_8250_mdr1_errataset() compared to omap-serial is the issue. errata i202 says access to MDR1 can cause data corruption. Assuming both reads and writes can cause glitch then, that read is not following advisory: I don't have SDP board so, could you verify if below diff helps: diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 6aaa84355fd1..8ab9d0a1b1eb 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -163,11 +163,6 @@ static void omap_8250_mdr1_errataset(struct uart_8250_port *up, struct omap8250_priv *priv) { u8 timeout = 255; - u8 old_mdr1; - - old_mdr1 = serial_in(up, UART_OMAP_MDR1); - if (old_mdr1 == priv->mdr1) - return; serial_out(up, UART_OMAP_MDR1, priv->mdr1); udelay(2);