From patchwork Thu Sep 6 12:45:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1414211 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BF4ADDFFCF for ; Thu, 6 Sep 2012 12:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755779Ab2IFMvM (ORCPT ); Thu, 6 Sep 2012 08:51:12 -0400 Received: from na3sys009aog120.obsmtp.com ([74.125.149.140]:47460 "EHLO na3sys009aog120.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755714Ab2IFMvI (ORCPT ); Thu, 6 Sep 2012 08:51:08 -0400 Received: from mail-lpp01m010-f46.google.com ([209.85.215.46]) (using TLSv1) by na3sys009aob120.postini.com ([74.125.148.12]) with SMTP ID DSNKUEicO+lWqjRFe/k811iMRZZUliefhQZJ@postini.com; Thu, 06 Sep 2012 05:51:08 PDT Received: by lagy9 with SMTP id y9so1063612lag.19 for ; Thu, 06 Sep 2012 05:51:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Hr619/jvBClrJbKHMK7gTMAg/m/5CgAO2PPJbqdMP2s=; b=SZtpw8RfLQ6nJbZRK4IccCVSRh+xjboWRMQUIf6vX952Qm3OgZ68LIrP+unNGICWoF 98Tz701eCouzywhMZyRtZZGQpWvQjgzVBddlNyXBMyhDGxNmgBs6VEDjNUCVYWt7IgLt /NEixo5VFQ09Meba2wHtESlczYSrZJMyz7ga6HwAcRl6/rHy8KJPQKpexn6m6fSgzWZp RzoyCSn6hi+DJq7xYm4dYMQC/qKNTCayPZPEgYJ2L4XlWNmXpNC10LW1SLfr/grU2bTI Eu1FFlnicfjsssCEEnlr/WR1ubkFvYLlFsXQKG+T+xIRFFzzRQlJ381aFtG1w4/hvJHb EWgg== Received: by 10.112.51.201 with SMTP id m9mr820438lbo.2.1346935865778; Thu, 06 Sep 2012 05:51:05 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id sm7sm2069197lab.5.2012.09.06.05.51.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Sep 2012 05:51:05 -0700 (PDT) From: Felipe Balbi To: Greg KH Cc: alan@linux.intel.com, Tony Lindgren , Kevin Hilman , Linux OMAP Mailing List , Linux ARM Kernel Mailing List , linux-serial@vger.kernel.org, Linux Kernel Mailing List , Santosh Shilimkar , Shubhrajyoti Datta , Sourav Poddar , Vikram Pandita , stable@vger.kernel.org, Felipe Balbi Subject: [PATCH v4 18/21] serial: omap: fix software flow control Date: Thu, 6 Sep 2012 15:45:37 +0300 Message-Id: <1346935540-1792-19-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.12.rc3 In-Reply-To: <1346935540-1792-1-git-send-email-balbi@ti.com> References: <20120906122948.GC29202@arwen.pp.htv.fi> <1346935540-1792-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQmqm79txO4bytQW3nwxUOQFEZ6rOkd7Y/MA4Hq1PUsNHCTg55LoUzGvMkxXMKktsxqEXfzS Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Vikram Pandita Software flow control register bits were not defined correctly. Also clarify the IXON and IXOFF logic to reflect what userspace wants. Cc: stable@vger.kernel.org Tested-by: Shubhrajyoti D Signed-off-by: Vikram Pandita Signed-off-by: Shubhrajyoti D Acked-by: Tony Lindgren Signed-off-by: Felipe Balbi --- arch/arm/plat-omap/include/plat/omap-serial.h | 4 ++-- drivers/tty/serial/omap-serial.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index 90d2d74..a79ed8b 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/arch/arm/plat-omap/include/plat/omap-serial.h @@ -42,10 +42,10 @@ #define OMAP_UART_WER_MOD_WKUP 0X7F /* Enable XON/XOFF flow control on output */ -#define OMAP_UART_SW_TX 0x04 +#define OMAP_UART_SW_TX 0x8 /* Enable XON/XOFF flow control on input */ -#define OMAP_UART_SW_RX 0x04 +#define OMAP_UART_SW_RX 0x2 #define OMAP_UART_SYSC_RESET 0X07 #define OMAP_UART_TCR_TRIG 0X0F diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 6a58f4f..1ba1f43 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -617,19 +617,19 @@ serial_omap_configure_xonxoff /* * IXON Flag: - * Enable XON/XOFF flow control on output. - * Transmit XON1, XOFF1 + * Flow control for OMAP.TX + * OMAP.RX should listen for XON/XOFF */ if (termios->c_iflag & IXON) - up->efr |= OMAP_UART_SW_TX; + up->efr |= OMAP_UART_SW_RX; /* * IXOFF Flag: - * Enable XON/XOFF flow control on input. - * Receiver compares XON1, XOFF1. + * Flow control for OMAP.RX + * OMAP.TX should send XON/XOFF */ if (termios->c_iflag & IXOFF) - up->efr |= OMAP_UART_SW_RX; + up->efr |= OMAP_UART_SW_TX; serial_out(up, UART_EFR, up->efr | UART_EFR_ECB); serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);