All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Giulio Benetti <giulio.benetti@micronovasrl.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>, Kees Cook <keescook@chromium.org>,
	Matthias Brugger <mbrugger@suse.com>,
	Allen Pais <allen.lkml@gmail.com>, Sean Young <sean@mess.org>,
	Ed Blake <ed.blake@sondrel.com>,
	Stefan Potyra <Stefan.Potyra@elektrobit.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Joshua Scott <joshua.scott@alliedtelesis.co.nz>,
	Vignesh R <vigneshr@ti.com>,
	Rolf Evers-Fischer <rolf.evers.fischer@aptiv.com>,
	Aaron Sierra <asierra@xes-inc.com>,
	Rafael Gago <rafael.gago@gmail.com>,
	Joel Stanley <joel@jms.id.au>, Sean Wang <sean.wang@mediatek.com>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/8] serial: 8250: Handle case port doesn't have TEMT interrupt using em485.
Date: Mon, 04 Jun 2018 14:38:58 +0300	[thread overview]
Message-ID: <2a2f547d787db9d593bb7fe3ad9c833836e23749.camel@linux.intel.com> (raw)
In-Reply-To: <4a7148d5-ab2c-425d-afdc-08ddd3c522c2@micronovasrl.com>

On Mon, 2018-06-04 at 12:50 +0200, Giulio Benetti wrote:
> 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.

This is an excerpt from the document you referred to:

--- 8< --- 8< ---

6 TEMT R Transmitter Empty bit. If in FIFO mode (FIFO_MODE != NONE) and
FIFOs enabled (FCR[0] set to one), this bit is set whenever the
Transmitter Shift Register and the FIFO are both empty. If in non-FIFO
mode or FIFOs are disabled, this bit is set whenever the Transmitter
Holding Register and the Transmitter Shift Register are both empty.

Reset Value: 0x1

--- 8< --- 8< ---


If I'm reading this correctly the support is there. Or otherwise, care
to point exact paragraph needs to be read and checked?

> I've tried to subscribe at Synopsis to obtain latest Datasheet but it 
> ask me an active ID I don't have.
> 

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2018-06-04 11:39 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 12:40 [PATCH 0/8] serial: 8250: Add 485 emulation to 8250_dw Giulio Benetti
2018-06-01 12:40 ` [PATCH 1/8] serial: 8250_dw: add em485 support Giulio Benetti
2018-06-01 12:40 ` [PATCH 2/8] serial: 8250_dw: allow enable rs485 at boot time Giulio Benetti
2018-06-01 12:40 ` [PATCH 3/8] serial: 8250: Copy em485 from port to real port Giulio Benetti
2018-06-04 10:13   ` Andy Shevchenko
2018-06-04 10:52     ` Giulio Benetti
2018-06-01 12:40 ` [PATCH 4/8] serial: 8250: Handle case port doesn't have TEMT interrupt using em485 Giulio Benetti
2018-06-04 10:17   ` Andy Shevchenko
2018-06-04 10:50     ` Giulio Benetti
2018-06-04 11:38       ` Andy Shevchenko [this message]
2018-06-04 11:50         ` Giulio Benetti
2018-06-04 12:26           ` Andy Shevchenko
2018-06-04 17:40   ` Matwey V. Kornilov
2018-06-04 18:50     ` Giulio Benetti
2018-06-05 10:51       ` Matwey V. Kornilov
2018-06-06  9:36         ` Giulio Benetti
2018-06-06  9:49         ` [PATCH 2/4] serial: 8250: Copy mctrl when register port Giulio Benetti
2018-06-06  9:49           ` Giulio Benetti
2018-06-06  9:49           ` [PATCH 3/4] serial: 8250: Make em485_rts_after_send() set mctrl according to rts state Giulio Benetti
2018-06-06  9:49             ` Giulio Benetti
2018-06-06 12:02             ` Andy Shevchenko
2018-06-06  9:49           ` [PATCH 4/4] serial: core: Mask mctrl with TIOCM_RTS too if rs485 on and RTS_AFTER_SEND set Giulio Benetti
2018-06-06  9:49             ` Giulio Benetti
2018-06-06 12:03             ` Andy Shevchenko
2018-06-06 12:07               ` Giulio Benetti
2018-06-06  9:49           ` [PATCH 1/4] serial: 8250: Copy em485 from port to real port Giulio Benetti
2018-06-06  9:49             ` Giulio Benetti
2018-06-06 11:56             ` Andy Shevchenko
2018-06-06 12:15               ` Giulio Benetti
2018-06-06 13:11                 ` Andy Shevchenko
2018-06-06 14:32                   ` Giulio Benetti
2018-06-06 18:55                   ` Matwey V. Kornilov
2018-06-06 19:15                     ` Giulio Benetti
2018-06-07  7:03                       ` Matwey V. Kornilov
2018-06-07 12:43                         ` Giulio Benetti
2018-06-06 12:01           ` [PATCH 2/4] serial: 8250: Copy mctrl when register port Andy Shevchenko
2018-06-06  9:51         ` [PATCH 2/4] serial: 8250_dw: allow enable rs485 at boot time Giulio Benetti
2018-06-06  9:51           ` Giulio Benetti
2018-06-06  9:51           ` [PATCH 3/4] serial: 8250: Handle case port doesn't have TEMT interrupt using em485 Giulio Benetti
2018-06-06  9:51             ` Giulio Benetti
2018-06-13 16:59             ` Alan Cox
2018-06-13 16:59               ` Alan Cox
2018-06-06  9:51           ` [PATCH 4/4] serial: 8250_dw: treat rpm suspend with -EBUSY if RS485 ON and RTS_AFTER_SEND Giulio Benetti
2018-06-06  9:51             ` Giulio Benetti
2018-06-06  9:51           ` [PATCH 1/4] serial: 8250_dw: add em485 support Giulio Benetti
2018-06-06  9:51             ` Giulio Benetti
2018-06-06 16:51             ` Andy Shevchenko
2018-06-06 19:16               ` Giulio Benetti
2018-06-01 12:40 ` [PATCH 5/8] serial: 8250_dw: treat rpm suspend with -EBUSY if RS485 ON and RTS_AFTER_SEND Giulio Benetti
2018-06-01 12:40 ` [PATCH 6/8] serial: 8250: Copy mctrl when register port Giulio Benetti
2018-06-06 14:31   ` Aaron Sierra
2018-06-06 14:44     ` Giulio Benetti
2018-06-01 12:40 ` [PATCH 7/8] serial: 8250: Make em485_rts_after_send() set mctrl according to rts state Giulio Benetti
2018-06-01 12:40 ` [PATCH 8/8] serial: core: Mask mctrl with TIOCM_RTS too if rs485 on and RTS_AFTER_SEND set Giulio Benetti
2018-06-04 10:12 ` [PATCH 0/8] serial: 8250: Add 485 emulation to 8250_dw Andy Shevchenko
2018-06-04 10:34   ` Matwey V. Kornilov
2018-06-04 10:42     ` Giulio Benetti
2018-06-04 11:44       ` Andy Shevchenko
2018-06-04 14:58         ` Giulio Benetti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a2f547d787db9d593bb7fe3ad9c833836e23749.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Stefan.Potyra@elektrobit.com \
    --cc=allen.lkml@gmail.com \
    --cc=asierra@xes-inc.com \
    --cc=ed.blake@sondrel.com \
    --cc=giulio.benetti@micronovasrl.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@jms.id.au \
    --cc=joshua.scott@alliedtelesis.co.nz \
    --cc=jslaby@suse.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mbrugger@suse.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rafael.gago@gmail.com \
    --cc=rolf.evers.fischer@aptiv.com \
    --cc=sean.wang@mediatek.com \
    --cc=sean@mess.org \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.