Patchwork [U-Boot,v5,05/11] serial: Remove unnecessary delay in serial_s3c24x0

login
register
mail settings
Submitter José Miguel Gonçalves
Date Sept. 21, 2012, 6:47 p.m.
Message ID <1348253268-21812-6-git-send-email-jose.goncalves@inov.pt>
Download mbox | patch
Permalink /patch/185878/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

José Miguel Gonçalves - Sept. 21, 2012, 6:47 p.m.
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@inov.pt>
---
Changes for v2:
   - New patch

Changes for v3:
   - None

Changes for v4:
   - None

Changes for v5:
   - None
---
 drivers/serial/serial_s3c24x0.c |    3 ---
 1 file changed, 3 deletions(-)

Patch

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)