[U-Boot] [PATCH v4 05/11] serial: Remove unnecessary delay in serial_s3c24x0

José Miguel Gonçalves jose.goncalves at inov.pt
Wed Sep 19 13:25:21 CEST 2012


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>
---
Changes for v2:
   - New patch

Changes for v3:
   - None

Changes for v4:
   - None
---
 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)
-- 
1.7.9.5



More information about the U-Boot mailing list