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: 10347627 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 692D06031B for ; Wed, 18 Apr 2018 09:11:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E3CD28590 for ; Wed, 18 Apr 2018 09:11:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FB4D285CA; Wed, 18 Apr 2018 09:11:31 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1BB1A28590 for ; Wed, 18 Apr 2018 09:11:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=O0nBjWiPvFFpekuBrshctxoBlwRH2StYsg6iLRInfbc=; b=Hq6iDs0v/BbMLZ jsaAEQQ8yOWFHldjHHIzX54FRLGPxpJ2xsQ51QLhr35Z4ECVL/kkwAt/vae8rp15s6RLSZSOgY7eP UTfptAnKhAG8mICWqwQH1susmwTfOM9JmO9tGrnf2Y/LH9oPQxXUJYiNsbC6+GzK4y+Yub3stA96i XTlaqoUx70TBNXgkM3haG4f1WA7HI0EOnnGcWrGTEr3Ew0z77a49OtCGEYjfpFIxYYlTFKTCPnY5V 14u8DkkshGMUSp1yYVEeJX0C+XBshGJXDNhg/AdSREoLhjpDP8rXPAEY37phKHycn6ZNOFhQOKFv6 E/XNduodiSqUfeylMOfQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8j7c-0006rz-NZ; Wed, 18 Apr 2018 09:11:24 +0000 Received: from lelnx193.ext.ti.com ([198.47.27.77]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8j7Y-0006qQ-AX for linux-arm-kernel@lists.infradead.org; Wed, 18 Apr 2018 09:11:21 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180418_021120_457302_890D7F96 X-CRM114-Status: GOOD ( 21.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , linux-omap@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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);