From patchwork Wed Dec 17 12:52:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 5506861 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 91FB3BEEA8 for ; Wed, 17 Dec 2014 12:50:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B255E20A22 for ; Wed, 17 Dec 2014 12:50:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCDD220A16 for ; Wed, 17 Dec 2014 12:50:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751818AbaLQMuN (ORCPT ); Wed, 17 Dec 2014 07:50:13 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:62949 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750829AbaLQMuM (ORCPT ); Wed, 17 Dec 2014 07:50:12 -0500 Received: by mail-pa0-f52.google.com with SMTP id eu11so16188933pac.25 for ; Wed, 17 Dec 2014 04:50:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=BLIzHpR7RBodWlqCEiXb7OgqRVgscGTjp5Qsx6y9+8A=; b=e5aZ2t22hXa1SoqiqSgscsFJ/KQ5YL+ySYBekFND/4TzGJpv6+/rSeb4OL0bikboIc kz5Zq38DrDJNt2NzIHHLDDbgL2HystcZsmDNog9+M1WzV37/yOCCPFFHntHgo+JcgA2d hw7J7GfP9fTf05sAgxv4DT+b6pCl5SyqrT6uYHCCMIZVL/lNhZrGi9oDP8Lj+T4ArXwJ mcy01P6ZnhKiDhZI+UZRwTkuI3TylC1EoqFtMpRJWQrQV7Su5x8UxJ4cPKatmU8134YG Z73GnHBRiqQaSeA3ObFebCQ5NuFljrbNG5d9dNxqCRIbBb/80Ihws+UthhWEqzUL3n6u 1DkQ== X-Received: by 10.66.160.129 with SMTP id xk1mr68669862pab.5.1418820611979; Wed, 17 Dec 2014 04:50:11 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id qf1sm3884192pdb.49.2014.12.17.04.50.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Dec 2014 04:50:10 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: gregkh@linuxfoundation.org, Magnus Damm , jslaby@suse.cz, linux-serial@vger.kernel.org Date: Wed, 17 Dec 2014 21:52:55 +0900 Message-Id: <20141217125255.14480.64174.sendpatchset@w520> In-Reply-To: <20141217125236.14480.78833.sendpatchset@w520> References: <20141217125236.14480.78833.sendpatchset@w520> Subject: [PATCH 02/05] serial: sh-sci: Fix default RTS handling Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Fix the default SCIF handling in case CTS/RTS is available on the target board but disabled by user space. Without this patch the RTS output value is not set. Signed-off-by: Magnus Damm --- drivers/tty/serial/sh-sci.c | 5 ++++- include/linux/serial_sci.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0004/drivers/tty/serial/sh-sci.c +++ work/drivers/tty/serial/sh-sci.c 2014-12-16 14:31:53.000000000 +0900 @@ -522,9 +522,12 @@ static void sci_init_pins_default(struct if (!reg->size || hwflow_enabled) return; + /* Setup CTS/RTS in the case hardware flow is disabled by user space. + * The CTS signal is setup as input and RTS as output with value 1. + */ status = serial_port_in(port, SCSPTR); status &= ~SCSPTR_CTSIO; - status |= SCSPTR_RTSIO; + status |= SCSPTR_RTSIO | SCSPTR_RTSDT; serial_port_out(port, SCSPTR, status); /* Set RTS = 1 */ } --- 0001/include/linux/serial_sci.h +++ work/include/linux/serial_sci.h 2014-12-16 14:25:40.000000000 +0900 @@ -57,6 +57,7 @@ /* SCSPTR (Serial Port Register), optional */ #define SCSPTR_RTSIO (1 << 7) /* Serial Port RTS Pin Input/Output */ +#define SCSPTR_RTSDT (1 << 6) /* Serial Port RTS Pin Data */ #define SCSPTR_CTSIO (1 << 5) /* Serial Port CTS Pin Input/Output */ #define SCSPTR_SPB2IO (1 << 1) /* Serial Port Break Input/Output */ #define SCSPTR_SPB2DT (1 << 0) /* Serial Port Break Data */