Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3437806imm; Mon, 4 Jun 2018 03:43:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLwNJrOW7IeY+lsDf/Jb6AMiO05mhs7WflaONEQChP9ZNWUaFMr0ha4DZgTuQoSAyS1HTwH X-Received: by 2002:a62:cf44:: with SMTP id b65-v6mr8136514pfg.80.1528109016049; Mon, 04 Jun 2018 03:43:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528109016; cv=none; d=google.com; s=arc-20160816; b=wWSbb5v32nJZbguAmNACrZmQ5lCtGjgio1ZnKu/K4KLcCY1ILc7SHw38aJEy6GMvEL vRRNB1vw9kjIrAZcAXusBjVFqicBW9ZgGZOpVCAo46fgoIHGzIfBC+in1Q93PswyhxHs VXYiPd9lJkdgMAZaXlZlWw35+P3iPlZPTmNeqhMxhnLAqtAvkkK3ARp3dL5KieB/X69k MzzzmRMVIzXvMNVIfLwYYThEGprTSvjgg8PL1OPqKaTXD4eOX+u4LQ6pEggd4Ao2aYHK Tf6PvL9BtWDhfjuAQ4Tg4a8iJhxBzbto3qGKhgf6FAMjqbnIkqj3E+qWwHjWihih0UvS fmFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=NXT09dv8O2jjwb32Uba9FqhTt5jVKcou4sIPM9vCang=; b=zewcRZ8YOQpBIObmbZ9PpSZir2i9bw2jLGCn3W10uQ6Dg8dwPlpC/OOXUC3vT8m7x/ qkpvLJ5/OfqtxHC9ota3MzLXfVCgXuJ32NHR2rfmULSUBiC2/CRq96ZTwn6DDiSdwItF LkT4ebXAux6Ke0c4MH4UUMeD/i8aU1OYjIsSTECYYrdlZJSymE5Y8phwAbe9EzM4kEqj +BDk1wHNHeceMPefdjiCYCBojmQawqDi63AdIHnVi94G3NTz/+kas/ZIYGbPDB4/HQ5e fOOFsiXZuJr+6MlcVYQDTplSdK7tIh/OiR+AA+2T8G1rh0+7qDqrO86bQ3PW9QkHMJcB +f3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=YffGywxd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1-v6si45826026pld.188.2018.06.04.03.43.21; Mon, 04 Jun 2018 03:43:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=YffGywxd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751989AbeFDKm4 (ORCPT + 99 others); Mon, 4 Jun 2018 06:42:56 -0400 Received: from mail.micronovasrl.com ([212.103.203.10]:43466 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbeFDKmy (ORCPT ); Mon, 4 Jun 2018 06:42:54 -0400 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 067C4B006FC for ; Mon, 4 Jun 2018 12:42:53 +0200 (CEST) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:to:subject:subject; s=dkim; t= 1528108972; x=1528972973; bh=o2elH8FIiXyZs5IWZL6LtjrlfjsKDLWIQV7 KJcmRyU8=; b=YffGywxdGIraUOn7lBWOngJ9GrHAHi8Y+3gLaorVnWrR/BQuQjH dVkrI2PRISQzZ+zzC9Ra0vI/IZtfi9HV6Y6ykoz4xaIB/lso9/CStGgpRzrfs1nz GLgbXw2V61EWi3LcsKt1j/0EnV8eOHw6UIU0loiAviLekGjafM3Aq/v8= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=unavailable autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id yB8l-439Qxi1 for ; Mon, 4 Jun 2018 12:42:52 +0200 (CEST) Received: from [192.168.178.22] (unknown [87.18.119.93]) by mail.micronovasrl.com (Postfix) with ESMTPSA id AAA38B00056; Mon, 4 Jun 2018 12:42:48 +0200 (CEST) Subject: Re: [PATCH 0/8] serial: 8250: Add 485 emulation to 8250_dw. To: "Matwey V. Kornilov" , Andy Shevchenko Cc: Greg Kroah-Hartman , Jiri Slaby , Kees Cook , Matthias Brugger , Allen Pais , Sean Young , Ed Blake , Stefan Potyra , Philipp Zabel , Joshua Scott , Vignesh R , Rolf Evers-Fischer , Aaron Sierra , Rafael Gago , Joel Stanley , Sean Wang , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180601124021.102970-1-giulio.benetti@micronovasrl.com> <65c26f5db1275e958cfe6390e9336568b0158dea.camel@linux.intel.com> From: Giulio Benetti Message-ID: Date: Mon, 4 Jun 2018 12:42:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: it Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi everybody, Il 04/06/2018 12:34, Matwey V. Kornilov ha scritto: > 2018-06-04 13:12 GMT+03:00 Andy Shevchenko : >> On Fri, 2018-06-01 at 14:40 +0200, Giulio Benetti wrote: >>> Need to handle rs485 with 8250_dw port. >>> >>> Use existing em485 emulation layer for 8250 taking care to fix some >>> bug >>> and taking care especially of RTS_AFTER_SEND case. >>> >> >> I don't see in Cc list author of rs485 code, who might be interested in >> this. >> >> So, added him here. Thanks Andy for adding in Cc an reviewing. Dumb question: how did you find him? I thought he was between people on get_maintainer.pl output. >> > > Hi, Andy > > Nice to see you there. I will look through the code later. > I always thought that DW has its own hardware rs485 support. Hi Matwey, I've checked on Synopsis Designware 8250 datasheet and it's not supported. Here is datasheet I went through: https://linux-sunxi.org/images/d/d2/Dw_apb_uart_db.pdf On IER register there is not TEMT bit or something like that used in 8250_omap. Am I right? Thanks everybody and best regards -- Giulio Benetti CTO MICRONOVA SRL Sede: Via A. Niedda 3 - 35010 Vigonza (PD) Tel. 049/8931563 - Fax 049/8931346 Cod.Fiscale - P.IVA 02663420285 Capitale Sociale € 26.000 i.v. Iscritta al Reg. Imprese di Padova N. 02663420285 Numero R.E.A. 258642 > >>> Giulio Benetti (8): >>> serial: 8250_dw: add em485 support >>> serial: 8250_dw: allow enable rs485 at boot time >>> serial: 8250: Copy em485 from port to real port. >>> serial: 8250: Handle case port doesn't have TEMT interrupt using >>> em485. >>> serial: 8250_dw: treat rpm suspend with -EBUSY if RS485 ON and >>> RTS_AFTER_SEND >>> serial: 8250: Copy mctrl when register port. >>> serial: 8250: Make em485_rts_after_send() set mctrl according to rts >>> state. >>> serial: core: Mask mctrl with TIOCM_RTS too if rs485 on and >>> RTS_AFTER_SEND set. >>> >>> drivers/tty/serial/8250/8250.h | 2 +- >>> drivers/tty/serial/8250/8250_core.c | 2 ++ >>> drivers/tty/serial/8250/8250_dw.c | 41 >>> ++++++++++++++++++++++++++++- >>> drivers/tty/serial/8250/8250_omap.c | 2 +- >>> drivers/tty/serial/8250/8250_port.c | 33 ++++++++++++++++------- >>> drivers/tty/serial/serial_core.c | 12 ++++++++- >>> include/linux/serial_8250.h | 1 + >>> 7 files changed, 79 insertions(+), 14 deletions(-) >>> >> >> -- >> Andy Shevchenko >> Intel Finland Oy >> > > >