From patchwork Thu Dec 31 08:53:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 561856 X-Patchwork-Delegate: sjg@chromium.org 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 350E3140BC8 for ; Thu, 31 Dec 2015 19:51:26 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=njxgmFSH; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3E5694BACB; Thu, 31 Dec 2015 09:50:50 +0100 (CET) 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 6NDUtBTort05; Thu, 31 Dec 2015 09:50:50 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5B4C34BAF9; Thu, 31 Dec 2015 09:50:29 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 236E94BAD8 for ; Thu, 31 Dec 2015 09:50:22 +0100 (CET) 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 Cg9m7ANsI4bP for ; Thu, 31 Dec 2015 09:50:22 +0100 (CET) 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 mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by theia.denx.de (Postfix) with ESMTPS id 509714BABC for ; Thu, 31 Dec 2015 09:50:14 +0100 (CET) Received: by mail-pa0-f41.google.com with SMTP id do7so1936847pab.2 for ; Thu, 31 Dec 2015 00:50:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=rN5b+h9dZXDj9Eg5ZFKwIQd5CcR3x/y2h7ScGHiGgvM=; b=njxgmFSHvpiiILpkBnUrxuk4lPL9tTF1IOA1EZ6R3GlZxND/xcN9wPYtMQHPUNGOLR tJKhlIdN/K5u6CqpIWtJRPRnFwVhShLSXWmhPubKKBGEJ79Xo9Zf4qtkhbujwDoQzsDS MwNFPjBays6Wd7AY+zgMk+uwnjg6wQ7TEkRE2YUPiqZ3C7fUk03cIJ7PCLvh+PqM5Yli wnppHxJPaFocxxl0vOHiZy6JSKm1G7E9G7ExwsP2Z40r+zrnSFuonxz/5zD8Fgj0i/fi 6D3k8i719ym+MIQq/HPj9sHa+mWj7LIh2i3LcAb4ZUSnW+/rrmHMjkb8xTy9ksuooEyz UohA== X-Received: by 10.66.236.162 with SMTP id uv2mr99602295pac.101.1451551812842; Thu, 31 Dec 2015 00:50:12 -0800 (PST) Received: from ala-d2121-lx1.wrs.com (unknown-157-139.windriver.com. [147.11.157.139]) by smtp.gmail.com with ESMTPSA id v11sm47310711pfa.81.2015.12.31.00.50.12 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 31 Dec 2015 00:50:12 -0800 (PST) From: Bin Meng To: Simon Glass , York Sun , Alison Wang , U-Boot Mailing List Date: Thu, 31 Dec 2015 00:53:07 -0800 Message-Id: <1451551990-32165-6-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1451551990-32165-1-git-send-email-bmeng.cn@gmail.com> References: <1451551990-32165-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 5/8] serial: lpuart: Call local version of setbrg and putc directly X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" There is no need to go through serial driver subsystem, instead call the driver's setbrg and putc routines directly. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- drivers/serial/serial_lpuart.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c index ae47183..0c0ab87 100644 --- a/drivers/serial/serial_lpuart.c +++ b/drivers/serial/serial_lpuart.c @@ -78,7 +78,7 @@ static int lpuart_serial_getc(void) static void lpuart_serial_putc(const char c) { if (c == '\n') - serial_putc('\r'); + lpuart_serial_putc('\r'); while (!(__raw_readb(&base->us1) & US1_TDRE)) WATCHDOG_RESET(); @@ -118,7 +118,7 @@ static int lpuart_serial_init(void) __raw_writeb(CFIFO_TXFLUSH | CFIFO_RXFLUSH, &base->ucfifo); /* provide data bits, parity, stop bit, etc */ - serial_setbrg(); + lpuart_serial_setbrg(); __raw_writeb(UC2_RE | UC2_TE, &base->uc2); @@ -165,7 +165,7 @@ static int lpuart32_serial_getc(void) static void lpuart32_serial_putc(const char c) { if (c == '\n') - serial_putc('\r'); + lpuart32_serial_putc('\r'); while (!(in_be32(&base->stat) & STAT_TDRE)) WATCHDOG_RESET(); @@ -201,7 +201,7 @@ static int lpuart32_serial_init(void) out_be32(&base->match, 0); /* provide data bits, parity, stop bit, etc */ - serial_setbrg(); + lpuart32_serial_setbrg(); out_be32(&base->ctrl, CTRL_RE | CTRL_TE);