Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp285493iof; Mon, 6 Jun 2022 03:32:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQTMZvQHrIzAmLbx1hTeIrNXyz9ICQk4d6l1YrkpWDvLzrtwKZ22Lr3LUb1/XCu5mYy5KR X-Received: by 2002:a63:5b0d:0:b0:3fb:9316:88ff with SMTP id p13-20020a635b0d000000b003fb931688ffmr20391850pgb.530.1654511547857; Mon, 06 Jun 2022 03:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654511547; cv=none; d=google.com; s=arc-20160816; b=mGiVtRivulTH9RUFJ5fvCLKKJWX3RFfK/59XNo0szkO5C6GpHd9L1z0Zu3Rlrr+uii k2+y24WLeAn82jKRoAkIX+QAIOlhs0HlDclqkLC/v4V4DmeKGfv3gMht90YFaAamqF05 DvqkJT0v2QCOFn4+a3q1oAnVuyOQCTnIoxSXKoE/2bs2FziQ2Frn4mxjf68dGrN+DOg5 3jrJ5gUtzmVbrgHY4yIk2/a8V9fnjgjaCBl2t55Mu48osHmJk9RN7B6h5m+7lj7Bq6TA UyQNycPOZJaZ9i/TFqhYGgs1dNfQZDzAGlDQC/4Gu87U49nOD0nYIzzhTaceROQn+N8j TaNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PQc8niZKVh8GVSQ3SC/Oq34toyQGc0XQ5GzwLZXdXeU=; b=UV4TAq7S/OfhLyDp2mjbjsbX35L9Tne2P3598nvbbP4I7+vdHqNPogMlsVKxtkaerG 28EyTCZfV4IwdxYOW56G56F2Q0sfMUdQiqLWi+Vno1vuBuX9FMwlsv2ol0c9r+BkFUgL R19ddxWa4Ae+6uIATBcQGOyErLqmtRR3B5G2jcmd8sO4eDlfNMVheU8EeK+jLdWJHmlZ nvaifbUXV7JVlum4UnxKeetV/SJeDIhD8j/fnzxTiAZeJdsvVzAESGmQWanOOO+8IpvV M88xiOjmmeU3VayYMzrC1uetOR3H95NOZcFyXlIB57dleCrI8TAV8G5qIh7DfazTlxN6 v8Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HnO20zhf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i30-20020a056a00005e00b0050a631780bdsi19576539pfk.339.2022.06.06.03.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 03:32:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HnO20zhf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F0575181476; Mon, 6 Jun 2022 03:11:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233841AbiFFKJX (ORCPT + 99 others); Mon, 6 Jun 2022 06:09:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233507AbiFFKGU (ORCPT ); Mon, 6 Jun 2022 06:06:20 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A205113F422; Mon, 6 Jun 2022 03:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654509979; x=1686045979; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/YabGktWvQG02Q/xoYLG4tb6J7+vtQn25dgAbOHlnbo=; b=HnO20zhfRM6HHbZDqXHftIHTrh4iIO/B6H+ebnleEsdEZXHWaAyh0NUt KC12iQHrjhm4Iytl+NPfq9uDWNu5FMzUgh6+HWBftprn4LHJg4ElmJMdE iLIAzdidQDt2/hUu96SI39584iiO9vH48rNhT6/2c6zr8tq+2gkHmTu3e r/1lbU6P+GKY7Y/t63ZMlh/529biIo0wiL+PDsICAGUPzMsPJ4XHK4ifb oN508xgNVBfwFmHQWW9/wmVvxDxUh+ENuR8JPFzI08i7QX3FMt9hh4Qr5 9reW3L4JEJizpT9206ux0RBw06pIGC8m1B5x6t28kGFnXX/cVE1gB2Pbx g==; X-IronPort-AV: E=McAfee;i="6400,9594,10369"; a="362987085" X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="362987085" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2022 03:06:19 -0700 X-IronPort-AV: E=Sophos;i="5.91,280,1647327600"; d="scan'208";a="635523868" 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:17 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: linux-serial@vger.kernel.org, Greg KH , Jiri Slaby , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 30/36] serial: fsl_lpuart: Call core's sanitization and remove custom one Date: Mon, 6 Jun 2022 13:04:27 +0300 Message-Id: <20220606100433.13793-31-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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Serial core handles serial_rs485 sanitization. Remove custom sanitization from lpuart_config_rs485. This change loses dev_err when SER_RS485_RX_DURING_TX is set due to incorrect configuration. Other drivers do not do similar prinout for full-duplex case and it should be done in serial core if it is desirable to notify on this condition. Personally, I doesn't see it important because the kernel gracefully downgrades to half-duplex. Signed-off-by: Ilpo Järvinen --- drivers/tty/serial/fsl_lpuart.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 88692dc9eefa..d35414cb3e4e 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1365,11 +1365,6 @@ static int lpuart_config_rs485(struct uart_port *port, ~(UARTMODEM_TXRTSPOL | UARTMODEM_TXRTSE); writeb(modem, sport->port.membase + UARTMODEM); - /* clear unsupported configurations */ - rs485->delay_rts_before_send = 0; - rs485->delay_rts_after_send = 0; - rs485->flags &= ~SER_RS485_RX_DURING_TX; - if (rs485->flags & SER_RS485_ENABLED) { /* Enable auto RS-485 RTS mode */ modem |= UARTMODEM_TXRTSE; @@ -1400,11 +1395,6 @@ static int lpuart32_config_rs485(struct uart_port *port, & ~(UARTMODEM_TXRTSPOL | UARTMODEM_TXRTSE); lpuart32_write(&sport->port, modem, UARTMODIR); - /* clear unsupported configurations */ - rs485->delay_rts_before_send = 0; - rs485->delay_rts_after_send = 0; - rs485->flags &= ~SER_RS485_RX_DURING_TX; - if (rs485->flags & SER_RS485_ENABLED) { /* Enable auto RS-485 RTS mode */ modem |= UARTMODEM_TXRTSE; @@ -2723,13 +2713,6 @@ static int lpuart_probe(struct platform_device *pdev) if (ret) goto failed_get_rs485; - if (sport->port.rs485.flags & SER_RS485_RX_DURING_TX) - dev_err(&pdev->dev, "driver doesn't support RX during TX\n"); - - if (sport->port.rs485.delay_rts_before_send || - sport->port.rs485.delay_rts_after_send) - dev_err(&pdev->dev, "driver doesn't support RTS delays\n"); - uart_rs485_config(&sport->port); ret = devm_request_irq(&pdev->dev, sport->port.irq, handler, 0, -- 2.30.2