Message ID | 20160609151039.20817-4-bhuvanchandra.dv@toradex.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 0C72960467 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 9 Jun 2016 15:13:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F31D728328 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 9 Jun 2016 15:13:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7D5728356; Thu, 9 Jun 2016 15:13:41 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9529828328 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 9 Jun 2016 15:13:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bB1cy-0005eB-93; Thu, 09 Jun 2016 15:12:12 +0000 Received: from mail-db5eur01on0101.outbound.protection.outlook.com ([104.47.2.101] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bB1cX-0005FN-2D for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2016 15:11:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toradex.onmicrosoft.com; s=selector1-toradex-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=G+ICvaxMqBYbmabq48lOD1bjnRxdOjLmpFcpST1Pi+w=; b=FIcJV0OHVPonMxd7t7OTBhUcguxOzLNwApZFqXyheahVo5KxQKpBnVSyLdMYyuymHkj1VQI7pSMk6Uag6EAdvY7GGA5XMNEPg88LNQJ9BVjXgKPcn008aOIHzJodHS2HEiQrwLXmuAcqh4b9naF9ELNv4VbnTtTZtIlyvp2ppYo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=bhuvanchandra.dv@toradex.com; Received: from tdx-in-nb-0014.toradex.ext (115.115.243.34) by DB4PR05MB270.eurprd05.prod.outlook.com (10.242.158.24) with Microsoft SMTP Server (TLS) id 15.1.511.8; Thu, 9 Jun 2016 15:11:19 +0000 From: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> To: <gregkh@linuxfoundation.org> Subject: [PATCH 3/8] tty: serial: fsl_lpuart: fix clearing of receive flag Date: Thu, 9 Jun 2016 20:40:34 +0530 Message-ID: <20160609151039.20817-4-bhuvanchandra.dv@toradex.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160609151039.20817-1-bhuvanchandra.dv@toradex.com> References: <20160609151039.20817-1-bhuvanchandra.dv@toradex.com> MIME-Version: 1.0 X-Originating-IP: [115.115.243.34] X-ClientProxiedBy: SIXPR04CA0050.apcprd04.prod.outlook.com (10.162.171.40) To DB4PR05MB270.eurprd05.prod.outlook.com (10.242.158.24) X-MS-Office365-Filtering-Correlation-Id: 449813a9-4690-4d99-4834-08d390785286 X-Microsoft-Exchange-Diagnostics: 1; DB4PR05MB270; 2:Y00cNdXIS9yQ+mATKvprmFMjRx09qPgzshxnSDYIStoQPj/oan5yuwhpE+nPzHIUTghMEYIxd7kFUicEBbeskGLG+1WLLae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2D28= X-Microsoft-Exchange-Diagnostics: 1; DB4PR05MB270; 20:s60zJ9kJS8yc9tZysBos0gCkN7cs6AE+5B1PfXseXTKx+QLUkCd0tCRYqQLAP3P+ffZ3+b1v6Fll5QLQgMXO4IjWAaQPegQ49my4uF5xjtH2i/aoZKYea8svP8HAr9FqBW4rCvBrcNClaGFIVC0oLno/xlgl39//dBVWXkEqqIjeiYj+uLrXCBpLXgaH3POkQKt2tU52bzucW2ZheV3F02JsdVnk4hVqLiaZ0z0dJaaZwG4fjFo8GvO8xHZVtQoq3ARCh1U45ZTY1bySZRJpQbNR/xLN3fRPXVQ69TsFlmoqGFnxMspFEsM4nK9KXOa9zF1pfPV0AUJPcn1j/wyiUw==; 4:sm5P9HX/dqMVsqPoWs2Tz3yklOSb/hD0ZbCYfYfnwUeWZSc0ufpYbgMBMLiN4UMwW/Q+xBrXZS5mVLiZ1gmfxlniqVjE9J6N1HepWL4rujqTHQ654R07gZAeqe2UiRFg4Lh3zh9Hyh1V1YptAK85euC4KZ7dqVi/KbHYpZW5utEar5lw5Dr8f01xAVd4hyXAkpsVkXENVG6w61z+y5rLWU6dHMNJ3+HmdgLRN0otoxcP9ko23f5Otbu5shuejCiFAdNSKfannFmfj+NWO3dvkZOxbP6blOSneyFayPnGZXWdMiHTE8HaYsFzaf/aiLrG+84gjk83OJjvP1wLvfbMZZr8526lOQQaV/ZSR99XEyrZJeg8IkYJlfEvhzTfHz3n X-Microsoft-Antispam-PRVS: <DB4PR05MB2708E95653B5817D623D2698D5F0@DB4PR05MB270.eurprd05.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:DB4PR05MB270; BCL:0; PCL:0; RULEID:; SRVR:DB4PR05MB270; X-Forefront-PRVS: 0968D37274 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(189002)(199003)(36756003)(50466002)(4001430100002)(42186005)(1076002)(86362001)(19580395003)(69596002)(48376002)(5008740100001)(81156014)(19580405001)(97736004)(4326007)(2906002)(77096005)(101416001)(81166006)(50226002)(2950100001)(33646002)(6116002)(68736007)(2351001)(3846002)(5003940100001)(107886002)(105586002)(110136002)(106356001)(53416004)(229853001)(50986999)(8676002)(189998001)(92566002)(5004730100002)(66066001)(586003)(76176999)(47776003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB4PR05MB270; H:tdx-in-nb-0014.toradex.ext; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: toradex.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB4PR05MB270; 23:4GPOfjHNm3MEnN6isvbIu+s9QltSbvynzrPg+meXBh?= =?us-ascii?Q?EIIpA+1/odLR9HpJ1WFKonYmgDBf0rDjyR0nAQKjH4URmcwD0Z8SrsGH3VRs?= =?us-ascii?Q?2WrEd7+EFUtWhQ9iXdIUdTKAOyL+sTUi//nm99j4UNP6UrL1gdBrTmt0W4SN?= =?us-ascii?Q?EPQcT+tnrm6czEn+6YE4Ic4Q4+1ukq50oEl/1ssrNjFPLS4cQ8V9CzN2T8YI?= =?us-ascii?Q?EogrOHdrZ6oYlOI/K7L1L/PfDPfzjjfJQutGiJoRG3L0BSxYE9Z3ZUwh9RJY?= =?us-ascii?Q?/pC5jkZtrCgiiXglIlEGl6OaSV/2caAwXuy2qJ5c68HX+/XkrN15Wd6fkuqt?= =?us-ascii?Q?nNYxW0gMZkf0B7i5rRGjnTXrTqTL4v05vToOKp+kRsmsjFTBWJfpo8kg16YZ?= =?us-ascii?Q?fkP1JK2TUZEnvLbCrf1I7nupN8uoQA6cEjgn75Nv2ukrxBxxwO8aDWvcOZ5i?= =?us-ascii?Q?DZf5kKLo9LvQdGzDhB4WvPcXAm3S6iiimXh5Qrw6AMa+DjOhS4rn161Mv4+e?= =?us-ascii?Q?/M1u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QUJZLX3kt3z16HvKE=; 7:o3Ku1z8VdS7SqFn5dMYMylaYZCBJGRA/Rujx34WT4k2lFW5GfFB/XLCr84fWyrdf1PCWEubejUJnSFYxCtL3y0MT941pdKNjtoamwXyb9qPeuNx/xVb8XB9fJN5nPEeyVVmHhCKBKrJjkfnmGj0EIufVZ/vITXWe3vA0egMnFHL4gssfDidFPknOwgrorb88wV3dQ63PLTLwq3a27R3gqw== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: toradex.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2016 15:11:19.5316 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR05MB270 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160609_081145_361940_AFE33F6D X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-serial@vger.kernel.org, Stefan Agner <stefan.agner@toradex.com>, mturquette@baylibre.com, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, stefan@agner.ch, kernel@pengutronix.de, jslaby@suse.com, shawnguo@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 75a2098..97c1fda 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -935,13 +935,16 @@ static void lpuart_setup_watermark(struct lpuart_port *sport) writeb(val | UARTPFIFO_TXFE | UARTPFIFO_RXFE, sport->port.membase + UARTPFIFO); - /* explicitly clear RDRF */ - readb(sport->port.membase + UARTSR1); - /* flush Tx and Rx FIFO */ writeb(UARTCFIFO_TXFLUSH | UARTCFIFO_RXFLUSH, sport->port.membase + UARTCFIFO); + /* explicitly clear RDRF */ + if (readb(sport->port.membase + UARTSR1) & UARTSR1_RDRF) { + readb(sport->port.membase + UARTDR); + writeb(UARTSFIFO_RXUF, sport->port.membase + UARTSFIFO); + } + writeb(0, sport->port.membase + UARTTWFIFO); writeb(1, sport->port.membase + UARTRWFIFO);