From patchwork Wed Feb 3 03:43:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 76583 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o133gxb1008582 for ; Wed, 3 Feb 2010 03:42:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751538Ab0BCDm5 (ORCPT ); Tue, 2 Feb 2010 22:42:57 -0500 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:58550 "EHLO mho-01-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751140Ab0BCDm5 (ORCPT ); Tue, 2 Feb 2010 22:42:57 -0500 Received: from muru.com ([72.249.23.125] helo=localhost.localdomain) by mho-01-ewr.mailhop.org with esmtpa (Exim 4.68) (envelope-from ) id 1NcW8l-0008GP-Oz; Wed, 03 Feb 2010 03:42:56 +0000 Received: from Mutt by mutt-smtp-wrapper.pl 1.2 (www.zdo.com/articles/mutt-smtp-wrapper.shtml) X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 72.249.23.125 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18Ih9Ro1XrsQrLGb30Ly4o5 Date: Tue, 2 Feb 2010 19:43:22 -0800 From: Tony Lindgren To: linux-arm-kernel@lists.infradead.org Cc: Kevin Hilman , linux-omap@vger.kernel.org Subject: Re: [PATCH 9/9] omap: Disable serial port autoidle by default Message-ID: <20100203034322.GZ22747@atomide.com> References: <20100203022318.26347.34734.stgit@baageli.muru.com> <20100203022618.26347.51428.stgit@baageli.muru.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100203022618.26347.51428.stgit@baageli.muru.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 03 Feb 2010 03:42:59 +0000 (UTC) diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 8c964be..e10a02d 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -36,7 +36,13 @@ #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 #define UART_OMAP_WER 0x17 /* Wake-up enable register */ -#define DEFAULT_TIMEOUT (5 * HZ) +/* + * NOTE: By default the serial timeout is disabled as it causes lost characters + * over the serial ports. This means that the UART clocks will stay on until + * disabled via sysfs. This also causes that any deeper omap sleep states are + * blocked. + */ +#define DEFAULT_TIMEOUT 0 struct omap_uart_state { int num; @@ -422,7 +428,8 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) uart->timeout = DEFAULT_TIMEOUT; setup_timer(&uart->timer, omap_uart_idle_timer, (unsigned long) uart); - mod_timer(&uart->timer, jiffies + uart->timeout); + if (uart->timeout) + mod_timer(&uart->timer, jiffies + uart->timeout); omap_uart_smart_idle_enable(uart, 0); if (cpu_is_omap34xx()) {