From patchwork Mon Jun 6 10:04:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ilpo_J=C3=A4rvinen?= X-Patchwork-Id: 12870217 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2AE5AC433EF for ; Mon, 6 Jun 2022 10:11:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KE8/nCt4ftyjs+y4xdvYwCwtEk1FdgolCqW17TEsKiM=; b=FbGVl+ZDzVrO6w UibdZB72eAQMelEFJ0ecFhsUMDtYJYIqlewhmfqLG9bFDt9JokJplEAF1sC5lcYPJsbYJFPVIk4Lb YJrsRdK61zz/s6GS8V3OC5bf2DyoqzWFIuF9brXD120d/bGkeCMn+aHuAPoPU1MM587BtfDuNxKfz qiZz9kJfoWAjS4QgbV9lIClbifYvBOPg1B4Rpcg+up4wK55MeVCcRWsc7AyJqXsNhIcc5ztfJODnQ xWLvndQCrUaGe9FQCzKjEmuy5XhpN8n2QaP29pP0ViwQRXIy6NjKA90AJ+nl9Mes6WRs02DcepeLH Zq9MoEy7mEy7PO0zcV7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ny9gM-000de5-Pq; Mon, 06 Jun 2022 10:09:59 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ny9ci-000bhX-IG for linux-arm-kernel@lists.infradead.org; Mon, 06 Jun 2022 10:06:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654509972; x=1686045972; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AqwC+FxddxhYwSjVH6EJblIR6L9xqWvygg7hjybJuBc=; b=EDtK9dCayGucEKOKhm7p57tuZteo4Vfnp6oTx2AINk7fELcsqZRb7Vnu SEjEy2EFLriJZwRzogfGtC01yJCv2vDJrFIFxMYQAlgrXae8xi0pmmmy2 kD78C7VPnSvzKwcN5ZP+UrC60E8URdfquaWeSkJSELVIRYLULoqoBijSh TjCgQS5GQ97wXu9Z1nyyeZ4x/Re8Wf7xnXo1V/X+KGO7USG8RTgJ91cXG fn6XN2m15wXHDphFae514EEDUpAGEdsFfYpp7FBVZW92Wcmtnbqv+kjLo 0vHjpTgyLCLPF2jqKbVDLV/GxOVN/rGFTETIXYXS3gsqmAehmErPPTKxQ Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10369"; a="276681774" X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="276681774" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2022 03:06:11 -0700 X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="635523845" Received: from amkossek-mobl1.ger.corp.intel.com (HELO ijarvine-MOBL2.ger.corp.intel.com) ([10.252.57.11]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2022 03:06:09 -0700 From: =?utf-8?q?Ilpo_J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , Vladimir Zapolskiy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= Subject: [PATCH 27/36] serial: 8250: lpc18xx: Remove serial_rs485 sanitization Date: Mon, 6 Jun 2022 13:04:24 +0300 Message-Id: <20220606100433.13793-28-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220606100433.13793-1-ilpo.jarvinen@linux.intel.com> References: <20220606100433.13793-1-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220606_030612_673177_A69E0942 X-CRM114-Status: UNSURE ( 9.02 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Serial core handles serial_rs485 sanitization and copying rs485 struct. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/8250/8250_lpc18xx.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/tty/serial/8250/8250_lpc18xx.c b/drivers/tty/serial/8250/8250_lpc18xx.c index 66ce5d05fe9c..3a1cb51cbc91 100644 --- a/drivers/tty/serial/8250/8250_lpc18xx.c +++ b/drivers/tty/serial/8250/8250_lpc18xx.c @@ -40,14 +40,6 @@ static int lpc18xx_rs485_config(struct uart_port *port, u32 rs485_dly_reg = 0; unsigned baud_clk; - if (rs485->flags & SER_RS485_ENABLED) - memset(rs485->padding, 0, sizeof(rs485->padding)); - else - memset(rs485, 0, sizeof(*rs485)); - - rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND | - SER_RS485_RTS_AFTER_SEND; - if (rs485->flags & SER_RS485_ENABLED) { rs485_ctrl_reg |= LPC18XX_UART_RS485CTRL_NMMEN | LPC18XX_UART_RS485CTRL_DCTRL; @@ -73,14 +65,9 @@ static int lpc18xx_rs485_config(struct uart_port *port, / baud_clk; } - /* Delay RTS before send not supported */ - rs485->delay_rts_before_send = 0; - serial_out(up, LPC18XX_UART_RS485CTRL, rs485_ctrl_reg); serial_out(up, LPC18XX_UART_RS485DLY, rs485_dly_reg); - port->rs485 = *rs485; - return 0; }