On Wed, Dec 14, 2016 at 3:02 PM, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote: > On Fri, Dec 9, 2016 at 1:36 PM, Ulrich Hecht > <ulrich.hecht+renesas@xxxxxxxxx> wrote: >> Implements support for FIFO fill thresholds greater than one with software >> timeout. >> >> This mechanism is not possible (or at least not useful) on SCIF family >> hardware other than SCIFA and SCIFB because they do not support turning off >> the DR hardware timeout interrupt separately from the RI interrupt. > > What about HSCIF? Your code does handle HSCIF (cfr. HSRTRGR below)? Same as the other non-A/B SCIFs. >> --- a/drivers/tty/serial/sh-sci.c >> +++ b/drivers/tty/serial/sh-sci.c > >> @@ -1159,6 +1162,24 @@ static int scif_set_rtrg(struct uart_port *port, int rx_trig) >> return rx_trig; >> } >> >> +static int scif_rtrg_enabled(struct uart_port *port) >> +{ >> + if (sci_getreg(port, HSRTRGR)->size) >> + return serial_port_in(port, HSRTRGR) != 0; >> + else >> + return (serial_port_in(port, SCFCR) & >> + (SCFCR_RTRG0 | SCFCR_RTRG1)) != 0; >> +} I implemented this to work with all SCIFs, but ATM it is only used in the "SCIFA/B, software timeout" case. CU Uli