From patchwork Fri Sep 21 18:47:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jos=C3=A9_Miguel_Gon=C3=A7alves?= X-Patchwork-Id: 185878 X-Patchwork-Delegate: promsoft@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 4A96D2C0085 for ; Sat, 22 Sep 2012 04:49:31 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 95DD1280AA; Fri, 21 Sep 2012 20:49:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5zSnCZy5hT0L; Fri, 21 Sep 2012 20:49:23 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2F9B4280B1; Fri, 21 Sep 2012 20:49:07 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 01B1728086 for ; Fri, 21 Sep 2012 20:49:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OzkiZKy9icjV for ; Fri, 21 Sep 2012 20:48:59 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from lmv.inov.pt (lmv.inov.pt [146.193.64.2]) by theia.denx.de (Postfix) with ESMTPS id 7C20828089 for ; Fri, 21 Sep 2012 20:48:53 +0200 (CEST) Received: from st-ze.inov.intranet (gtout.inov.pt [146.193.64.254]) by lmv.inov.pt (8.13.1/8.13.1) with ESMTP id q8LIlvl8011996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Sep 2012 19:47:59 +0100 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20Gon=C3=A7alves?= To: u-boot@lists.denx.de Date: Fri, 21 Sep 2012 19:47:42 +0100 Message-Id: <1348253268-21812-6-git-send-email-jose.goncalves@inov.pt> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1348253268-21812-1-git-send-email-jose.goncalves@inov.pt> References: <1348253268-21812-1-git-send-email-jose.goncalves@inov.pt> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (lmv.inov.pt [146.193.64.2]); Fri, 21 Sep 2012 19:47:59 +0100 (WEST) X-INOV-EmailServer-Information: Please contact the Email service provider for more information X-INOV-EmailServer: Found to be clean X-INOV-EmailServer-From: jose.goncalves@inov.pt Cc: marex@denx.de, trini@ti.com, =?UTF-8?q?Jos=C3=A9=20Miguel=20Gon=C3=A7alves?= , scottwood@freescale.com Subject: [U-Boot] [PATCH v5 05/11] serial: Remove unnecessary delay in serial_s3c24x0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- 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(-) 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)