Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3446651imm; Mon, 4 Jun 2018 03:52:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJfeqkmZxRb8g25KilRQ8kL5LMgXM5WUN4Gq5m0cSpfQiEqwFyVO/8hatUC+MZL/BJ2/TJP X-Received: by 2002:a17:902:4303:: with SMTP id i3-v6mr21906940pld.394.1528109570690; Mon, 04 Jun 2018 03:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528109570; cv=none; d=google.com; s=arc-20160816; b=DJSfLXL1jfFeqZAN7HKeG36641Zvj7fkB7Jc4m28a0N/etRyRp0TTVA/E1w8Voc7u+ pgC+koGGAAYe3odYaSR0cu6sUCapoG5b6jjQh63fjn5o6Nziup0QS+0542c04UKgDTan Q29v9lFLBFGgQVi4842E+qBYImXPiP/KTlO05YLa36RdscKZrjM4b/JVGiZLZ+5DY9v0 3JmOCvQ0vIhR4xX7aUnPpwqfWryN86VCsKp/TNYdZvWVujA2yi+d5zJLgHqmDjUa6DMp 8ucrKSOc3ARTTqtqRqz5+NVOTsf51ubz988gMQPTnWS8rlJ9i/6Nbkh+21CovgfZltY8 C5ig== 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=NQ5lrXh1WM7BJQ5ot/vh3gsVdZwCNswrGwljL6ztCy4=; b=EzAny8xjtcew8ML+dVMTcKEM8uAkEWhF7a/rskBuE9MlOyZR84Qa2Xfibb+GawjYXY hq4V+XFjhe1l2P8X5bf91ISA//tOBZ7lsf+BJr4rtbWUUu/xOzSPFgnw9+51PwHgMw2h gVyEwQfZU7KmCKSJoCUqMgkr86sqqDMgvqhEdheNGg8OrWnJbTDqpVyVZbq8bHVMrtW3 HL6nkc0D/YL+mTLD0NFjq/iaQE/k3uXo4oIAkCVfTPIx6q/Pkw5Kj8XeDNqJMrofMiQj rZixKv1h1QUpUa6cNsc9VQTjviWKKGs+fJNS92u6HbKXi0ipJ+smIm/TywaQc76RnsTx QrYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=cvLUpyNO; 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 p3-v6si46583543pld.408.2018.06.04.03.52.35; Mon, 04 Jun 2018 03:52:50 -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=cvLUpyNO; 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 S1752288AbeFDKux (ORCPT + 99 others); Mon, 4 Jun 2018 06:50:53 -0400 Received: from mail.micronovasrl.com ([212.103.203.10]:43806 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751798AbeFDKuv (ORCPT ); Mon, 4 Jun 2018 06:50:51 -0400 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id DAA12B00736 for ; Mon, 4 Jun 2018 12:50:49 +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= 1528109449; x=1528973450; bh=FvsTeQcTl1WYMDlWwRHlo7lTO9dDQs6g75J bygm2nGE=; b=cvLUpyNOP2CY5zixIHb+Y61qNx+IhAsQCW3ct+iKx16rTym387s 3qeVecLezNpu5kj3VZyvHhpJBKT0EoWE4GsJ1HwEMLVGbMBEXDUMAOJCT87pUYjA q5nlr+2WPX+nzYKWgmqzBqKoh9d8tJrHWfCdQta5+JqXOS5NTYLDXx70= 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 Xz9LmS4effNg for ; Mon, 4 Jun 2018 12:50:49 +0200 (CEST) Received: from [192.168.178.22] (unknown [87.18.119.93]) by mail.micronovasrl.com (Postfix) with ESMTPSA id EC850B00159; Mon, 4 Jun 2018 12:50:45 +0200 (CEST) Subject: Re: [PATCH 4/8] serial: 8250: Handle case port doesn't have TEMT interrupt using em485. To: Andy Shevchenko , Greg Kroah-Hartman Cc: 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> <20180601124021.102970-5-giulio.benetti@micronovasrl.com> <3a66327727d9bf2ce5adf8ef0f1fcc1fffeaa4ec.camel@linux.intel.com> From: Giulio Benetti Message-ID: <4a7148d5-ab2c-425d-afdc-08ddd3c522c2@micronovasrl.com> Date: Mon, 4 Jun 2018 12:50:44 +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: <3a66327727d9bf2ce5adf8ef0f1fcc1fffeaa4ec.camel@linux.intel.com> 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, Il 04/06/2018 12:17, Andy Shevchenko ha scritto: > On Fri, 2018-06-01 at 14:40 +0200, Giulio Benetti wrote: >> Some 8250 ports only have TEMT interrupt, so current implementation >> can't work for ports without it. The only chance to make it work is to >> loop-read on LSR register. >> >> With NO TEMT interrupt check if both TEMT and THRE are set looping on >> LSR register. > >> --- a/drivers/tty/serial/8250/8250_dw.c >> +++ b/drivers/tty/serial/8250/8250_dw.c > >> - int ret = serial8250_em485_init(up); >> + int ret = serial8250_em485_init(up, false); > > Is true for all possible DW configured types? Or it's your particular > case? > 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 There seems not to be TEMT interrupt, I use it under sunxi SoC and on their datasheet(A20 for example), they don't report that interrupt too. So it seems to be valid for all DW configured types, anyway I don't know how many IP reviews there could be of that peripheral. I've tried to subscribe at Synopsis to obtain latest Datasheet but it ask me an active ID I don't have. -- 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