From patchwork Thu Aug 23 10:33:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 1365651 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id AADCF3FC66 for ; Thu, 23 Aug 2012 10:39:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933895Ab2HWKjC (ORCPT ); Thu, 23 Aug 2012 06:39:02 -0400 Received: from na3sys009aog101.obsmtp.com ([74.125.149.67]:42986 "EHLO na3sys009aog101.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933898Ab2HWKiI (ORCPT ); Thu, 23 Aug 2012 06:38:08 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]) (using TLSv1) by na3sys009aob101.postini.com ([74.125.148.12]) with SMTP ID DSNKUDYID7lo+duAWrU4effzD8b6uZiP8a2C@postini.com; Thu, 23 Aug 2012 03:38:08 PDT Received: by lbbgp3 with SMTP id gp3so339133lbb.29 for ; Thu, 23 Aug 2012 03:38:05 -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=kR5jJAU93PfJ0bnwdCNBILT1aoPQXwKqPSm1Y50epx0=; b=XPOV9Ug5rihyo3cPT1mpAu73u4NVSUuaU+bhCG9m/y9Q6f07lkwJ7/TRqfdy62r1/E OCCaOVbz1g21r4SKpK8VlztaEQ56PJRj0+rM5T7ew6LbqgT3O1dI/t/5HfmryfEwNq6S YeaPusEhbg+MJWwKKJQgYbZal9v+FSFNK4B+V4OfyEWk+s8XBKgNZHdpx5Uz0GwslSlr UacgLgf92FykVV+tSqBoNiP8z5hfCal0He2hAKWWfggev77+Z3a4ABiUnH6miznHqkG9 frGXvlZWfMrxTdl2ZMUDbohXh4g2K6ODUg+XM4wTFYrlf+mtbG5qdVJwvbRgOPPxcomh +QVw== Received: by 10.112.25.167 with SMTP id d7mr676172lbg.74.1345718285782; Thu, 23 Aug 2012 03:38:05 -0700 (PDT) Received: from localhost (cs78217178.pp.htv.fi. [62.78.217.178]) by mx.google.com with ESMTPS id ba4sm1780105lbb.14.2012.08.23.03.38.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 03:38:04 -0700 (PDT) From: Felipe Balbi To: alan@linux.intel.com Cc: 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 , Felipe Balbi Subject: [PATCH v3 23/23] serial: omap: enable RX and TX FIFO usage Date: Thu, 23 Aug 2012 13:33:03 +0300 Message-Id: <1345717983-18179-24-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.12.rc3 In-Reply-To: <1345717983-18179-1-git-send-email-balbi@ti.com> References: <1345717983-18179-1-git-send-email-balbi@ti.com> X-Gm-Message-State: ALoCoQnEReplFxzZsLOVNx++Yzg38kKmUWxxDhE/Ryu6TKn1thX0SOTk3z1ubRRUDhSJmxJYsB4q Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org enable RX FIFO for 16 characters and TX FIFO for 16 spaces. Tested-by: Shubhrajyoti D Signed-off-by: Felipe Balbi --- drivers/tty/serial/omap-serial.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 0e5ffdf..137d475 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -55,8 +55,8 @@ #define OMAP_UART_SCR_RX_TRIG_GRANU1_MASK (1 << 7) /* FCR register bitmasks */ -#define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT 6 #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK (0x3 << 6) +#define OMAP_UART_FCR_TX_FIFO_TRIG_MASK (0x3 << 4) /* MVR register bitmasks */ #define OMAP_UART_MVR_SCHEME_SHIFT 30 @@ -820,9 +820,13 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios, up->scr |= OMAP_UART_SCR_RX_TRIG_GRANU1_MASK; - /* Set receive FIFO threshold to 1 byte */ + /* Set receive FIFO threshold to 16 characters and + * transmit FIFO threshold to 16 spaces + */ up->fcr &= ~OMAP_UART_FCR_RX_FIFO_TRIG_MASK; - up->fcr |= (0x1 << OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT); + up->fcr &= ~OMAP_UART_FCR_TX_FIFO_TRIG_MASK; + up->fcr |= UART_FCR6_R_TRIGGER_16 | UART_FCR6_T_TRIGGER_24 | + UART_FCR_ENABLE_FIFO; serial_out(up, UART_FCR, up->fcr); serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);