Re: [RFC PATCH 1/2] serial: imx: Avoid busy polling for transmitter to become empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03.04.2024 17:22:52, Esben Haabendal wrote:
> Busy polling with readl() is a rather harsh way to wait for a potentially
> long time.

This read_poll_timeout_atomic() is compiled to an
imx_uart_readl()/udelay()/cpu_relax() loop. Does the introduction of
udelay() bring any advantages?

> While there, introduce a 10 ms timeout on this waiting, similar to what
> many other serial drivers do.

But you don't handle the return value...

> Signed-off-by: Esben Haabendal <esben@xxxxxxxxxx>

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux