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

José Miguel Gonçalves jose.goncalves at inov.pt
Fri Sep 14 19:28:56 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
---
 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