From patchwork Wed Apr 9 19:49:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 28117 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f70.google.com (mail-qg0-f70.google.com [209.85.192.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 75F91202DD for ; Wed, 9 Apr 2014 19:49:25 +0000 (UTC) Received: by mail-qg0-f70.google.com with SMTP id i50sf3759343qgf.1 for ; Wed, 09 Apr 2014 12:49:25 -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=c8jWfgc19+npRVQ7RDeMY9NXOCDxE8Q/KnM/wOBev7w=; b=kgKPyRwyx2nJ6IZUGCzi/p31x64Q8ixOBac4frBRb5kGuFdL5OIkFo5nUERQMJKC+Z nv2DVVsl+2S4vii1RO67Lgf8AwPABHrJcaM3HW+VjBv2zpe5dvKgmZY9h+rRmU+KO/og ftVsCIQkHllfRkEFRvzR9BBgZUP4rMjchjtXOw81ymKboyFcxhvX4t1f06jxsg20dGt5 GL20ForEikF3BIyaR4G5NMmvlq1ET+SEYdXVpNq8c/uA/UJEPuiOnIH5GZ6pxZYDKeJL YEkbsW47LUudUwijmd1NSzZl9DuGSPzaubTYUsQcDs81Ks8DGo5eTOMCM2H8PshuMPPM ujhQ== X-Gm-Message-State: ALoCoQmGm0L39QkgwTsinKBR00z2T4K31huaZhQ4Qz3EdIrLRfq0VwVlcaEZbYH3+F2hN1kZWfxv X-Received: by 10.58.178.137 with SMTP id cy9mr6476216vec.34.1397072965123; Wed, 09 Apr 2014 12:49:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.72 with SMTP id s66ls842502qgs.85.gmail; Wed, 09 Apr 2014 12:49:24 -0700 (PDT) X-Received: by 10.52.12.36 with SMTP id v4mr8949580vdb.20.1397072964937; Wed, 09 Apr 2014 12:49:24 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id ls10si314775vec.64.2014.04.09.12.49.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 12:49:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.179 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.179; Received: by mail-ve0-f179.google.com with SMTP id db12so2489824veb.24 for ; Wed, 09 Apr 2014 12:49:24 -0700 (PDT) X-Received: by 10.58.211.69 with SMTP id na5mr2175444vec.30.1397072964819; Wed, 09 Apr 2014 12:49:24 -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 v8csp356730vcv; Wed, 9 Apr 2014 12:49:24 -0700 (PDT) X-Received: by 10.205.96.138 with SMTP id cg10mr184383bkc.111.1397072963779; Wed, 09 Apr 2014 12:49:23 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id z9si1185303bkn.30.2014.04.09.12.49.23 for ; Wed, 09 Apr 2014 12:49:23 -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 C308D4B5FF; Wed, 9 Apr 2014 21:49:22 +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 dBgGCYT15yt7; Wed, 9 Apr 2014 21:49:22 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7B8004B5D6; Wed, 9 Apr 2014 21:49:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BC7AD4B5D6 for ; Wed, 9 Apr 2014 21:49:17 +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 YRne9Cvp+QSZ for ; Wed, 9 Apr 2014 21:49:13 +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 devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id 24A954B5D5 for ; Wed, 9 Apr 2014 21:49:09 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s39Jn79K010660 for ; Wed, 9 Apr 2014 14:49:07 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s39Jn7Fo002930 for ; Wed, 9 Apr 2014 14:49:07 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Wed, 9 Apr 2014 14:49:07 -0500 Received: from ares-ubuntu.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s39Jn7e9019055; Wed, 9 Apr 2014 14:49:07 -0500 Received: from a0868495 by ares-ubuntu.am.dhcp.ti.com with local (Exim 4.76) (envelope-from ) id 1WXyUd-0006An-0Q; Wed, 09 Apr 2014 15:49:07 -0400 From: Murali Karicheri To: , Date: Wed, 9 Apr 2014 15:49:06 -0400 Message-ID: <1397072946-23698-1-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Subject: [U-Boot] [RESEND: 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.179 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_HWFLOW Signed-off-by: Murali Karicheri --- Depends on keystone patch series on the u-boot mailing list drivers/serial/ns16550.c | 6 ++++++ include/ns16550.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 8a13454..e49a053 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_HWFLOW +#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