Russell King - ARM Linux admin <linux@xxxxxxxxxxxxxxx> writes: > On Fri, May 31, 2019 at 06:48:48PM +0200, Uwe Kleine-König wrote: >> On Fri, May 31, 2019 at 07:15:21PM +0300, Sergey Organov wrote: >> > Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> writes: >> > > The first (and only) driver I checked does. (sa1100.c) >> > >> > I think I'd rather take 8250 as reference implementation, as being most >> > widely used. Can anybody please tell how 8250 code handles this? Does it >> > attempt to drain Tx FIFO on termios changes? >> >> Well, there are so many 8250 variants that the driver is rather >> complicated. Also the original 8250 doesn't have a FIFO at all. >> >> Given that it might not be so easy to judge if a given driver drains the >> FIFO and transmitter without consulting the reference manual I'd rather >> rely on an authority for the serial core. (Apart from that I bet we're >> finding examples for both variants.) >> >> @gregkh, rmk: What do you think? > > Let me also clarify something above. Yes, sa1100.c is good to use as > a reference driver - it was carefully converted to serial_core by me > along with 8250, and I made sure the semantics in the driver were > correct for what the hardware supports. > > The key thing is "what the hardware supports" though - the serial > block has no hardware flow control signals, and it is expected that > GPIOs or other arrangements would be made where such signals were > necessary: What driver(s) do you recommend as a good reference implementation that manages decent hardware featuring FIFO and automatic RTS/CTS control? DMA? -- Sergey