From patchwork Wed Apr 3 18:31:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Pelykh X-Patchwork-Id: 2388961 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id E708FDFB79 for ; Wed, 3 Apr 2013 18:33:55 +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 1UNSVO-0002pZ-QY for patchwork-linux-arm@patchwork.kernel.org; Wed, 03 Apr 2013 18:33:55 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNSTX-000559-L3; Wed, 03 Apr 2013 18:31:59 +0000 Received: from mail-qc0-x22a.google.com ([2607:f8b0:400d:c01::22a]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNSTU-00054n-7T for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2013 18:31:57 +0000 Received: by mail-qc0-f170.google.com with SMTP id d42so832682qca.29 for ; Wed, 03 Apr 2013 11:31:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=5EwvRodj+9GpYdERlGGAzf5JR66o9MfNHDFIr6lLDdU=; b=Lo0dpZzGZPbWTjPPyYXS/EHUSIkVMR3/4CNr9QRuIqdhiDxcTvSvi4jtUFJFarQ3UN ZiTpLV5tlOl3/AU/YD07mvWZGaROTS+QNFWEH1ZvpuaJnuBivQ58XPM+u6b+oGeSbWAI ezxZzJQVlJc1Bpp7ohIcm982G5tx1rOPhTFroLeld2hEoWVLvGB7dxP4RFXwbatUAbMQ nqKgE70GjjW3AtwvJdV7Sj5LixCW/vgb61UJ+17GdyGj1JjrAb5wJ8noDxdOJcKAkpah e720jNCmtoXm28hLTb9gLU+361xSatWo0y6aisVyYVoSm0jePl/O9aB/9ZWxgrWMrEb5 au4g== X-Received: by 10.229.8.141 with SMTP id h13mr932121qch.21.1365013914100; Wed, 03 Apr 2013 11:31:54 -0700 (PDT) Received: from inertiallabs-linux64 (pool-71-191-216-15.washdc.fios.verizon.net. [71.191.216.15]) by mx.google.com with ESMTPS id fr4sm8078282qab.3.2013.04.03.11.31.52 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Apr 2013 11:31:53 -0700 (PDT) Date: Wed, 3 Apr 2013 14:31:46 -0400 From: Alexey Pelykh To: Greg KH Subject: [PATCH] OMAP/serial: Revert bad fix of Rx FIFO threshold granularity Message-ID: <20130403183146.GA4072@inertiallabs-linux64> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130403_143156_372308_3DCC4EC4 X-CRM114-Status: UNSURE ( 9.60 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (alexey.pelykh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Paul Walmsley , Kevin Hilman , Felipe Balbi , linux-serial@vger.kernel.org, linux-omap@vger.kernel.org, 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 From: Alexey Pelykh Partially reverts 1776fd059c40907297d6c26c51876575d63fd9e2 that introduced regression reported by Paul Walmsley. This commit restores setting granularity in SCR register and adds note about comments below being inconsistent with actual code. Signed-off-by: Alexey Pelykh Cc: Paul Walmsley Cc: Kevin Hilman Cc: Felipe Balbi Cc: linux-serial@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-omap@vger.kernel.org Tested-by: Paul Walmsley --- Paul, please confirm that this patch solves the regression. diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 4dc4140..30d4f7a 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -886,6 +886,17 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios, serial_out(up, UART_MCR, up->mcr | UART_MCR_TCRTLR); /* FIFO ENABLE, DMA MODE */ + up->scr |= OMAP_UART_SCR_RX_TRIG_GRANU1_MASK; + /* + * NOTE: Setting OMAP_UART_SCR_RX_TRIG_GRANU1_MASK + * sets Enables the granularity of 1 for TRIGGER RX + * level. Along with setting RX FIFO trigger level + * to 1 (as noted below, 16 characters) and TLR[3:0] + * to zero this will result RX FIFO threshold level + * to 1 character, instead of 16 as noted in comment + * below. + */ + /* Set receive FIFO threshold to 16 characters and * transmit FIFO threshold to 16 spaces */