From patchwork Wed Apr 9 19:38:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 28116 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3B0C42145A for ; Wed, 9 Apr 2014 19:39:12 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id p10sf8406223pdj.11 for ; Wed, 09 Apr 2014 12:39:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=GCCUNFiiOfVkRBGuiGVK9xCgvrEVjB2GuSKejl0JmoE=; b=OAXk7oRop6xLoITyLOZlJTdmtPzdsVQRNxhArosM5RF3VX9cdcAaZosVda1nh5fl5W HOh8GrvIgL0Lk5Tn2qTQ3fOnlDHp2ALEBLPEjYTHyvDCn5tEqljUM4Pusr7CtvwMioRv dS4Zwg2PTM8zY042sbu9nqnLu+27bBcewKhXOr+/X8vGd9WxJQYPrXGn36FQ1UdaCGrh BzTWhdFV2Iik/aVCMUEcHq8gM8sHxysFNSDsRux37rXF0Q3gmPTCCI9bkyllSj4HDKgi R01doxhUY9/6W2yZVo5dlU8naIEkcUWWmsdt0jjcG4t/2OWLzT9gq0ILhs2rk3d3fF13 NBSg== X-Gm-Message-State: ALoCoQkJ/v/83ULg1sxebHKTPZdysrx1E6b62ONk9rV3GQENvC4chVYvSw+P5LJp9+3wNfXF3AiI X-Received: by 10.66.219.69 with SMTP id pm5mr5728735pac.8.1397072351417; Wed, 09 Apr 2014 12:39:11 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.27.138 with SMTP id 10ls871147qgx.52.gmail; Wed, 09 Apr 2014 12:39:11 -0700 (PDT) X-Received: by 10.52.251.199 with SMTP id zm7mr8751403vdc.21.1397072351123; Wed, 09 Apr 2014 12:39:11 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id d20si308353veu.97.2014.04.09.12.39.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 12:39:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jx11so2581806veb.3 for ; Wed, 09 Apr 2014 12:39:11 -0700 (PDT) X-Received: by 10.58.219.233 with SMTP id pr9mr10719606vec.10.1397072350960; Wed, 09 Apr 2014 12:39:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp356136vcv; Wed, 9 Apr 2014 12:39:10 -0700 (PDT) X-Received: by 10.205.18.3 with SMTP id qe3mr186822bkb.87.1397072349845; Wed, 09 Apr 2014 12:39:09 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id du6si1155900bkc.313.2014.04.09.12.39.09 for ; Wed, 09 Apr 2014 12:39:09 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98E934B5FD; Wed, 9 Apr 2014 21:39:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z7umkzB4AIVa; Wed, 9 Apr 2014 21:39:08 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8C43F4B5D5; Wed, 9 Apr 2014 21:39:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8F2224B5D5 for ; Wed, 9 Apr 2014 21:39:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ztSFpn7sXz56 for ; Wed, 9 Apr 2014 21:38:57 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by theia.denx.de (Postfix) with ESMTPS id 2B6824B58F for ; Wed, 9 Apr 2014 21:38:53 +0200 (CEST) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s39JcnJh008114 for ; Wed, 9 Apr 2014 14:38:52 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s39Jcnhm030391 for ; Wed, 9 Apr 2014 14:38:49 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Wed, 9 Apr 2014 14:38:49 -0500 Received: from ares-ubuntu.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s39Jcnq1021353; Wed, 9 Apr 2014 14:38:49 -0500 Received: from a0868495 by ares-ubuntu.am.dhcp.ti.com with local (Exim 4.76) (envelope-from ) id 1WXyKf-0005lo-7Q; Wed, 09 Apr 2014 15:38:49 -0400 From: Murali Karicheri To: , Date: Wed, 9 Apr 2014 15:38:46 -0400 Message-ID: <1397072326-22149-1-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Subject: [U-Boot] [PATCH] serial: nsl16550: add hw flow control support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m-karicheri2@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 keystone serial hw support hw flow control. This patch enables hw flow control for keystone EVMs as an optional feature based on CONFIG_SERIAL_HW_FLOW_CONTROL. Signed-off-by: Murali Karicheri --- depends on keystone patch series which is on the list. README | 4 ++++ drivers/serial/ns16550.c | 6 ++++++ include/ns16550.h | 1 + 3 files changed, 11 insertions(+) diff --git a/README b/README index 63c2dba..85c0076 100644 --- a/README +++ b/README @@ -711,6 +711,10 @@ The following options need to be configured: boot loader that has already initialized the UART. Define this variable to flush the UART at init time. + CONFIG_SERIAL_HW_FLOW_CONTROL + + Define this variable to enable hw flow control in serial driver. + Current user of this option is drivers/serial/nsl16550.c driver - Console Interface: Depending on board, define exactly one serial port diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 8a13454..f26979d 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -33,6 +33,12 @@ #if defined(CONFIG_K2HK_EVM) #define UART_REG_VAL_PWREMU_MGMT_UART_DISABLE 0 #define UART_REG_VAL_PWREMU_MGMT_UART_ENABLE ((1 << 14) | (1 << 13) | (1 << 0)) +#undef UART_MCRVAL +#ifdef CONFIG_SERIAL_HW_FLOW_CONTROL +#define UART_MCRVAL (UART_MCR_RTS | UART_MCR_AFE) +#else +#define UART_MCRVAL (UART_MCR_RTS) +#endif #endif #ifndef CONFIG_SYS_NS16550_IER diff --git a/include/ns16550.h b/include/ns16550.h index 51cb5b4..17f829f 100644 --- a/include/ns16550.h +++ b/include/ns16550.h @@ -100,6 +100,7 @@ typedef struct NS16550 *NS16550_t; #define UART_MCR_OUT1 0x04 /* Out 1 */ #define UART_MCR_OUT2 0x08 /* Out 2 */ #define UART_MCR_LOOP 0x10 /* Enable loopback test mode */ +#define UART_MCR_AFE 0x20 /* Enable auto-RTS/CTS */ #define UART_MCR_DMA_EN 0x04 #define UART_MCR_TX_DFR 0x08