From patchwork Sat Jan 1 01:11:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Williamson X-Patchwork-Id: 442671 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p011C3DO027514 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 1 Jan 2011 01:12:25 GMT Received: from dlep35.itg.ti.com ([157.170.170.118]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p011ANpY016568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 31 Dec 2010 19:10:23 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id p011AMHk026263; Fri, 31 Dec 2010 19:10:23 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id BD00780627; Fri, 31 Dec 2010 19:10:22 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 4D38C80626 for ; Fri, 31 Dec 2010 19:10:20 -0600 (CST) Received: from medina.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id p011AJwj001940 for ; Fri, 31 Dec 2010 19:10:19 -0600 (CST) Received: from psmtp.com (na3sys009amx210.postini.com [74.125.149.50]) by medina.ext.ti.com (8.13.7/8.13.7) with SMTP id p011AJwu029608 for ; Fri, 31 Dec 2010 19:10:19 -0600 Received: from source ([209.85.216.45]) by na3sys009amx210.postini.com ([74.125.148.10]) with SMTP; Fri, 31 Dec 2010 20:10:19 EST Received: by qwk4 with SMTP id 4so12587662qwk.4 for ; Fri, 31 Dec 2010 17:10:18 -0800 (PST) Received: by 10.224.28.69 with SMTP id l5mr16998070qac.354.1293844217041; Fri, 31 Dec 2010 17:10:17 -0800 (PST) Received: from localhost.localdomain (rrcs-24-39-249-130.nys.biz.rr.com [24.39.249.130]) by mx.google.com with ESMTPS id nb15sm9479480qcb.2.2010.12.31.17.10.15 (version=SSLv3 cipher=RC4-MD5); Fri, 31 Dec 2010 17:10:16 -0800 (PST) From: Michael Williamson To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 1/2] davinci: Support disabling modem status interrupts on SOC UARTS Date: Fri, 31 Dec 2010 20:11:56 -0500 Message-Id: <1293844317-11757-1-git-send-email-michael.williamson@criticallink.com> X-Mailer: git-send-email 1.7.0.4 X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:32.17989/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.0750) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] Cc: linux-arm-kernel@lists.infradead.org X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 01 Jan 2011 01:12:25 +0000 (UTC) diff --git a/arch/arm/mach-davinci/include/mach/serial.h b/arch/arm/mach-davinci/include/mach/serial.h index 8051110..db1d208 100644 --- a/arch/arm/mach-davinci/include/mach/serial.h +++ b/arch/arm/mach-davinci/include/mach/serial.h @@ -49,6 +49,8 @@ struct davinci_uart_config { /* Bit field of UARTs present; bit 0 --> UART1 */ unsigned int enabled_uarts; + /* Bit field of RTS/CTS disable; bit 0 --> UART1 */ + unsigned int disable_rtscts; }; extern int davinci_serial_init(struct davinci_uart_config *); diff --git a/arch/arm/mach-davinci/serial.c b/arch/arm/mach-davinci/serial.c index 1875740..738048e 100644 --- a/arch/arm/mach-davinci/serial.c +++ b/arch/arm/mach-davinci/serial.c @@ -31,6 +31,22 @@ #include #include +static void davinci_set_termios_noms(struct uart_port *up, + struct ktermios *new, + struct ktermios *old) +{ + /* + * disabling CLOCAL, or enabling CRTSCTS, will enable the modem status + * interrupts. If this routine is being called, the port in question + * does not have valid CTS/RTS pins (they are pinmuxed to some other + * function). Override any requested operation that may enable the + * interrupts. + */ + new->c_cflag &= ~CRTSCTS; + new->c_cflag |= CLOCAL; + serial8250_do_set_termios(up, new, old); +} + static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, int offset) { @@ -109,6 +125,9 @@ int __init davinci_serial_init(struct davinci_uart_config *info) if (p->membase && p->type != PORT_AR7) davinci_serial_reset(p); + + if (info->disable_rtscts & (1 << i)) + p->set_termios = davinci_set_termios_noms; } return platform_device_register(soc_info->serial_dev);