[U-Boot] [PATCH v2 05/11] serial: Remove unnecessary delay in serial_s3c24x0
Marek Vasut
marex at denx.de
Fri Sep 14 20:05:42 CEST 2012
Dear José Miguel Gonçalves,
> The loop used to make a delay after baudrate setting is not necessary.
> Moreover it is removed by the GCC optimizer (at least with GCC 4.6).
>
> Signed-off-by: José Miguel Gonçalves <jose.goncalves at inov.pt>
Acked-by: Marek Vasut <marex at denx.de>
> ---
> Changes for v2:
> - New patch
> ---
> drivers/serial/serial_s3c24x0.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/serial/serial_s3c24x0.c
> b/drivers/serial/serial_s3c24x0.c index c9bc121..ec5d1cb 100644
> --- a/drivers/serial/serial_s3c24x0.c
> +++ b/drivers/serial/serial_s3c24x0.c
> @@ -111,15 +111,12 @@ void _serial_setbrg(const int dev_index)
> struct s3c24x0_uart *uart = s3c24x0_get_base_uart(dev_index);
> u32 pclk;
> u32 baudrate;
> - int i;
>
> pclk = get_PCLK();
> baudrate = gd->baudrate;
>
> writel((pclk / baudrate / 16) - 1, &uart->ubrdiv);
> writel(udivslot[(pclk / baudrate) % 16], &uart->udivslot);
> - for (i = 0; i < 100; i++)
> - /* Delay */ ;
> }
>
> #if defined(CONFIG_SERIAL_MULTI)
Best regards,
Marek Vasut
More information about the U-Boot
mailing list