Message ID | 1446708079-1105-2-git-send-email-soren.brinkmann@xilinx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 34520BEEA4 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 5 Nov 2015 07:25:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B79F20812 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 5 Nov 2015 07:25:39 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id 4873220810 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 5 Nov 2015 07:25:38 +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 1ZuEtS-0004qt-55; Thu, 05 Nov 2015 07:23:34 +0000 Received: from mail-bn1bon0083.outbound.protection.outlook.com ([157.56.111.83] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZuEru-0003hY-Pa for linux-arm-kernel@lists.infradead.org; Thu, 05 Nov 2015 07:22:02 +0000 Received: from BN1BFFO11HUB039.protection.gbl (10.58.144.186) by BN1BFFO11HUB050.protection.gbl (10.58.144.197) with Microsoft SMTP Server (TLS) id 15.1.318.9; Thu, 5 Nov 2015 07:21:36 +0000 Received: from BN1BFFO11FD001.protection.gbl (10.58.144.31) by BN1BFFO11HUB039.protection.gbl (10.58.144.186) with Microsoft SMTP Server (TLS) id 15.1.318.9; Thu, 5 Nov 2015 07:21:35 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; linuxfoundation.org; dkim=none (message not signed) header.d=none;linuxfoundation.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BN1BFFO11FD001.mail.protection.outlook.com (10.58.144.64) with Microsoft SMTP Server (TLS) id 15.1.325.5 via Frontend Transport; Thu, 5 Nov 2015 07:21:34 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from <soren.brinkmann@xilinx.com>) id 1ZuErW-0005W2-4M; Wed, 04 Nov 2015 23:21:34 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from <soren.brinkmann@xilinx.com>) id 1ZuErV-00046i-Vb; Wed, 04 Nov 2015 23:21:34 -0800 Received: from [172.19.74.49] (helo=localhost) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from <soren.brinkmann@xilinx.com>) id 1ZuErO-00044g-Ky; Wed, 04 Nov 2015 23:21:26 -0800 From: Soren Brinkmann <soren.brinkmann@xilinx.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jiri Slaby <jslaby@suse.com> Subject: [PATCH v2 01/10] tty: xuartps: Beautify read-modify writes Date: Wed, 4 Nov 2015 23:21:10 -0800 Message-ID: <1446708079-1105-2-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.6.2.3.ga463a5b In-Reply-To: <1446708079-1105-1-git-send-email-soren.brinkmann@xilinx.com> References: <1446708079-1105-1-git-send-email-soren.brinkmann@xilinx.com> X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21920.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD001; 1:k+g1O0W9znZ8h1mpY/QGYBonNnjLZTdqjQtBzS6Ar/liYj+5w/EVshk07/stjqcPuv+5vZgmW6zGTkXzQ7wNJWm+QWbFIY4B0e0ycUngV2HlmCYyRBWbN2ijT3KiFU+F7BnB8Hse20S2KvxlY4VVu5nNaHXIgG+lfYWHugcL2m09d60qF51eyWvfN10+jraz5SPsCM5AEex7fzyNhbDKrfFWZ9myCEMQIq4mzfYLuFwFx/4zNtcPPustED/L2X7Ia3yNUAlDp2EEdfJhLxpF5LMj6bzRTDLSNJS16T18cMeku2vG/lvsaPEnve6+pJDK7XhY9RMFkQODcUIbPiZ5trxXqKzLxBmfRd0MgIk81jQ= X-Forefront-Antispam-Report: CIP:149.199.60.83; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(57986006)(33646002)(87936001)(5001920100001)(36756003)(11100500001)(5008740100001)(6806005)(50466002)(5007970100001)(106466001)(229853001)(50986999)(5003940100001)(5001770100001)(50226001)(76176999)(81156007)(63266004)(575784001)(5001960100002)(189998001)(19580405001)(107886002)(47776003)(36386004)(48376002)(76506005)(86362001)(92566002)(2950100001)(4001430100002)(77096005)(19580395003)(16796002)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1BFFO11HUB039; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11HUB039; 2:Yja7XERlvXC9fJdseqA4M+/FHsZQNHFvkYHBAvdQT7v6+nTNODR6IdSc1F2uaNx0iK/OlZhZPnArlcMYGOg/zzgHOCb0h4UfD5yhkqGIvPIzClzEo1mPoXJpk0kRBq65afFNa/plM6d8jx3INDS1LY8izDtAftzM5yxmqvILYMs=; 3:e8UVNWwcVxe3tF57K15CManxmWRxoerULSTTqzjSWH8OF+Tx25IoQL0tLdH4wsu+I7cWLQt6JapG9PtEc5acOLbWcY6aW/oWY9hWi2BjVM2uCO95Nw1vWPzyS50v4VWtjERlxoA1TgMSj8iOgQ4PQatHfkRILUBCyK73kCr0GmGH6JznIKFPlGdd8NcIm6TItjpaCLUGu3D+/B3tWncdbS7oNOxqpAA44VrgpOIqBGf9QBAskaPYLvwSuJJ1VP+IexD023bkRYWauxRygKRSNA==; 25:qEqiD6x5tKTEwyhqO/p9VN6fG2BxlpvCYILVd3EHr3Y9pMrHHxwLWEKQGYNmzgIHoNcPRjiwzjcmacqNPAlivYpenD1or8Fwe2OBac7bZeRvHQM27H9UW00fU8MLlYNxG06sScXb7kemAIXf/wwWvrT+bN/YlZAbfoFWjTKq0zkmYZjUJU4u+ARzVMHrUVQmtdkPy4t5bZcww20yRZKcq1QPek/CiDfSMHmM3PyAaycy7h+TjaYWgwfKgj7sc1dk X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BN1BFFO11HUB039; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11HUB039; 20:63kcgMXNbRAB1eJQeYjEoNdJ/rhEBN7r5b7ziVXGVCTjfIr+YgLPSFzl7HjYmvpii5/5xj9fm/riX5MiWR2DRWsVSFxBzZtCpxIGEWWLTAf9koCI/Y1qV2gLbazb9qaaLrlAS5ntswproAHSRqkV/6JsESJBZuGVBEHIPqEQSm1DzglWUovzLYWqaTAiBYUi+Ioe7KK+mXJMoI4czDH2H7+bZ1gDqDeLOCibBhjctY3JiHsAAFE9KOoFWNodw2XIbW1Um/nxtb+Y0GHMLVyhM4bhYzsVZuqV6/SVtqoaJkvMcyfx2xkKXwDzg3jak2iRrJMSAs1tiao3oVKBF0R155MuW0hx6Te6As5KxSFxZGe8Tdny8FmjxcAaCeG4vPwoUxxenaFnmI3Km9AR59HciR7i963Onx7BlkgvDNqS6ShkFsA8ehNC8FTDPQpT5Z+rBB2f7IWuPqVN3tLz5rsp2p4TDfszyKGJv5Pdf8sE3N90gaxdCg8sB//o/H7Tm8yH; 4:ANKa1DBXjGc4hWkkiXukbQOuZe2CQ44zIu3Xi+nwQ14fjofja3K5iQRe6I6qhRWE9KA059JhB7raO1YtIkwoKe3msbcJmBJdlYqJ1dffAYPRDQOmuD6Wwb2x1BWuL4mhIMGSZyNWGTXzSFPoQbpjklROBEBvNXY/IYks0SwLgZF/ZIXURBOkzOtRAz0reQVVaIzgLyod2ZPe4WFKlPi4Q9m4MQk7d4/khKLvNsX2vw2bJfw7yWErlNS+BoC6ZmxIkypzjZP2rGCryMq+ulXWbLezWdzVEISmkOMbBG9KPdcCDCmoB8SRhvlJiIRwjuBXcYYRpUNcdlzHQBc+OyvscWaI6HFZ7wEDZ9RIie2p/k3yKgvzbapW29trtmfqRrRq X-Microsoft-Antispam-PRVS: <BN1BFFO11HUB039FB968BA5999904DCB60C8C290@BN1BFFO11HUB039.protection.gbl> X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001); SRVR:BN1BFFO11HUB039; BCL:0; PCL:0; RULEID:; SRVR:BN1BFFO11HUB039; X-Forefront-PRVS: 0751474A44 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1BFFO11HUB039; 23:vfecd7L1Ue53NH1d7sX75fCytjoQ4qVgKE2iblt?= =?us-ascii?Q?lNUiwEod6MF/L/D9FIXBTQACERgFt8mTlFby9GzNhPhNf60fQoJtaA9DIjF1?= =?us-ascii?Q?mhTAtxLnMwwblrDa7OOW5iN7JmYv99U2l+B2KWG4lflFVG4O8qvJTlTmF5KZ?= =?us-ascii?Q?MnIxJxDLUkW6dUtnDjg0DwWasmaRR9Dd92N+3CQuS9q5DltMVyQ+prY+POIm?=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r2TyFx1cMQ6S0C+CKx4Ldlf?= =?us-ascii?Q?OHjLA24xpcRKvvsMYIVFGBZdUOeImjfsG?= X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11HUB039; 5:GPXnkXxyGV8Bu6csP84omEZ49d1qPHHJeaaYp5Wx1I9VzWKRO1f+3DHiSZv6zMxIwseyxEXBNq8m1t3P4U75epbLM46Tx0PH+zgp2mIAUcOVIewI2FOBRvTGveL9X/0TL9nnZgmZiNKTKPd0NqpJEw==; 24:bMSEdFrH3/YXLnlDfAxVPp+rn/cvtaGJ32LX56WvHBikywUlZuHWyDS3U10qjpojpZ/4jQ/I8HXIXH6OnNTQZA/KBMniBtdsvv1b2m5FDwI= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2015 07:21:34.9670 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1BFFO11HUB039 X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11HUB050; 2:r8gGmXVHM6ZjAW4c5+0uAN0AF1MDI/sAl1bPFCodVezhKSZRmpjgpb2O6n8xlDrcLRpmqRjKQun9TpBkGijx/4GhEJkO3EsVjy8yjc+fKOF1hXpMIMxaIMAPaMdCJwsACgV5feqUKp231ItLQwUKuVFpOeu+BS515SEBJ9HCrq8=; 23:nEMSu1zwrddeC8ThIjh7Nxs64pPXmR8nG6/EKMdZrJYC/8y4K1JRFlrkOLohoj//PY2qfj7dKdiavRX6uTvlXNOb1U8eTRS0hE1YdI+OxSwwfgKQeFdDfdJ7DskmstEv3uZIsJqbvDw9m+izkV5S5yUzb63hlJJL1j0haZsUIMk3uagVONlo6q36XGaE2kLI X-OriginatorOrg: xilinx.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151104_232159_178468_ACEB87D2 X-CRM114-Status: GOOD ( 11.09 ) X-Spam-Score: -1.9 (-) 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-arm-kernel@lists.infradead.org, Soren Brinkmann <soren.brinkmann@xilinx.com>, Michal Simek <michal.simek@xilinx.com>, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.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-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 009e0dbc12d2..50d4082d2354 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -515,12 +515,14 @@ static void cdns_uart_start_tx(struct uart_port *port) if (uart_circ_empty(&port->state->xmit) || uart_tx_stopped(port)) return; - status = readl(port->membase + CDNS_UART_CR_OFFSET); - /* Set the TX enable bit and clear the TX disable bit to enable the + /* + * Set the TX enable bit and clear the TX disable bit to enable the * transmitter. */ - writel((status & ~CDNS_UART_CR_TX_DIS) | CDNS_UART_CR_TX_EN, - port->membase + CDNS_UART_CR_OFFSET); + status = readl(port->membase + CDNS_UART_CR_OFFSET); + status &= ~CDNS_UART_CR_TX_DIS; + status |= CDNS_UART_CR_TX_EN; + writel(status, port->membase + CDNS_UART_CR_OFFSET); while (numbytes-- && ((readl(port->membase + CDNS_UART_SR_OFFSET) & CDNS_UART_SR_TXFULL)) != CDNS_UART_SR_TXFULL) { @@ -1123,8 +1125,9 @@ static void cdns_uart_console_write(struct console *co, const char *s, * clear the TX disable bit to enable the transmitter. */ ctrl = readl(port->membase + CDNS_UART_CR_OFFSET); - writel((ctrl & ~CDNS_UART_CR_TX_DIS) | CDNS_UART_CR_TX_EN, - port->membase + CDNS_UART_CR_OFFSET); + ctrl &= ~CDNS_UART_CR_TX_DIS; + ctrl |= CDNS_UART_CR_TX_EN; + writel(ctrl, port->membase + CDNS_UART_CR_OFFSET); uart_console_write(port, s, count, cdns_uart_console_putchar); cdns_uart_console_wait_tx(port);
Non-functional, formatting changes to ease reading the code. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> --- drivers/tty/serial/xilinx_uartps.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)