From patchwork Tue Jul 16 02:43:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Song, Elen" X-Patchwork-Id: 2827867 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CE396C0AB2 for ; Tue, 16 Jul 2013 03:20:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F03C2201BA for ; Tue, 16 Jul 2013 03:20:46 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4337201B8 for ; Tue, 16 Jul 2013 03:20:45 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UyvPY-00041T-IW; Tue, 16 Jul 2013 02:54:45 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UyvOs-00073d-W7; Tue, 16 Jul 2013 02:54:03 +0000 Received: from nasmtp02.atmel.com ([204.2.163.16]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UyvOq-00073H-EU for linux-arm-kernel@lists.infradead.org; Tue, 16 Jul 2013 02:54:00 +0000 Received: from apsmtp01.atmel.com (10.168.254.31) by sjoedg01.corp.atmel.com (10.64.253.30) with Microsoft SMTP Server (TLS) id 14.2.342.3; Mon, 15 Jul 2013 19:59:55 -0700 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.atmel.com (10.168.254.31) with Microsoft SMTP Server id 14.2.342.3; Tue, 16 Jul 2013 10:53:07 +0800 From: Elen Song To: , , Subject: [PATCH V2 8/8] serial: at91: modify UART to use software timer to trigger rx Date: Tue, 16 Jul 2013 10:43:47 +0800 Message-ID: <1373942627-7121-9-git-send-email-elen.song@atmel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1373942627-7121-1-git-send-email-elen.song@atmel.com> References: <1373942627-7121-1-git-send-email-elen.song@atmel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130715_225400_569081_297B836D X-CRM114-Status: UNSURE ( 8.09 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: gregkh@linuxfoundation.org, elen.song@atmel.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Elen Song --- drivers/tty/serial/atmel_serial.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 769b90b..67617a8 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -826,7 +826,7 @@ static void atmel_release_rx_dma(struct uart_port *port) atmel_port->chan_rx = NULL; atmel_port->cookie_rx = -EINVAL; - if (port->line == 0) + if (!atmel_port->is_usart) del_timer_sync(&atmel_port->uart_timer); } @@ -1230,7 +1230,7 @@ static void atmel_release_rx_pdc(struct uart_port *port) kfree(pdc->buf); } - if (port->line == 0) + if (!atmel_port->is_usart) del_timer_sync(&atmel_port->uart_timer); } @@ -1593,7 +1593,7 @@ static int atmel_startup(struct uart_port *port) if (atmel_use_pdc_rx(port)) { /* set UART timeout */ - if (port->line == 0) { + if (!atmel_port->is_usart) { setup_timer(&atmel_port->uart_timer, atmel_uart_timer_callback, (unsigned long)port); @@ -1610,7 +1610,7 @@ static int atmel_startup(struct uart_port *port) UART_PUT_PTCR(port, ATMEL_PDC_RXTEN); } else if (atmel_use_dma_rx(port)) { /* set UART timeout */ - if (port->line == 0) { + if (!atmel_port->is_usart) { setup_timer(&atmel_port->uart_timer, atmel_uart_timer_callback, (unsigned long)port);