From patchwork Thu Mar 19 02:05:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 6045121 X-Patchwork-Delegate: horms@verge.net.au 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A97B1BF90F for ; Thu, 19 Mar 2015 02:04:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B526203DA for ; Thu, 19 Mar 2015 02:04:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD3F9203AE for ; Thu, 19 Mar 2015 02:04:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752522AbbCSCET (ORCPT ); Wed, 18 Mar 2015 22:04:19 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:33515 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751793AbbCSCES (ORCPT ); Wed, 18 Mar 2015 22:04:18 -0400 Received: by pdnc3 with SMTP id c3so60654699pdn.0 for ; Wed, 18 Mar 2015 19:04:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=Pea3XaOkHM7ceAtFMOJc3kpu27ofMehexy0VzzsHPQU=; b=tMAxTWL3yiC8RZdXPL62EICiTE3X3Uqi0X4T6obWVUr++/axPE82Tok/baCXdNpMR8 /kzcRdDXYm5zkdJImLq1tg5710Ql1dtx00u00bz+8yhLkjjAsSqc/XCkZeGhoPukeq55 6gv2O0/xTS3UNgCK6PzJ9Tnh6w84IvTGMVanaD6KRWU7IMH201i9zblKusiEyhMZ9GAU Jwko7fCEu4M52ZKKss+OUZjSaQODM0mTaV9NWfnWdEbQT3hEG+XuiK1igrkOJdIWaBXi Lp/pEhwlvRk/q2R8Ce1diHgl1mIj5MHH5mBlUniUdloERFiATa2wXVyMib1IEoNtQFmR oo4Q== X-Received: by 10.66.234.2 with SMTP id ua2mr147642398pac.137.1426730658401; Wed, 18 Mar 2015 19:04:18 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id g10sm29694516pdm.29.2015.03.18.19.04.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 19:04:17 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , geert@glider.be, laurent.pinchart@ideasonboard.com Date: Thu, 19 Mar 2015 11:05:12 +0900 Message-Id: <20150319020512.14288.13653.sendpatchset@little-apple> Subject: [PATCH] sh73a0 KZM9G CTS/RTS prototype 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 This is a hack that enables console serial port hardware flow control for the KZM9G board. Not for upstream merge. Not-Yet-Signed-off-by: Magnus Damm --- arch/arm/boot/dts/sh73a0-kzm9g.dts | 1 + drivers/tty/serial/sh-sci.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) -- 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 --- 0001/arch/arm/boot/dts/sh73a0-kzm9g.dts +++ work/arch/arm/boot/dts/sh73a0-kzm9g.dts 2015-03-19 10:05:46.586786623 +0900 @@ -370,6 +370,7 @@ pinctrl-0 = <&scifa4_pins>; pinctrl-names = "default"; + ctsrts; status = "okay"; }; --- 0006/drivers/tty/serial/sh-sci.c +++ work/drivers/tty/serial/sh-sci.c 2015-03-19 10:09:14.726785875 +0900 @@ -573,6 +573,9 @@ static void sci_init_ctsrts_scifab(struc { unsigned short control, data; + printk("xxx SCIFAB hw flow control: %s\n", + hwflow_enabled ? "on" : "off"); + /* SCIFA/SCIFB CTS/RTS pin configuration depends on user space. * * In case of CTS - (SCPDR.CTSD is always accessible): @@ -2048,6 +2051,9 @@ static void sci_set_termios(struct uart_ } else serial_port_out(port, SCSMR, smr_val); + /* hard code modem control enablement for now */ + termios->c_cflag |= CRTSCTS; + sci_init_pins(port, termios->c_cflag); reg = sci_getreg(port, SCFCR); @@ -2055,6 +2061,10 @@ static void sci_set_termios(struct uart_ unsigned short ctrl = serial_port_in(port, SCFCR); if (s->cfg->capabilities & SCIx_HAVE_RTSCTS) { + + printk("xxx enabling hw flow control: %s\n", + (termios->c_cflag & CRTSCTS) ? "on" : "off"); + if (termios->c_cflag & CRTSCTS) ctrl |= SCFCR_MCE; else @@ -2640,6 +2650,8 @@ sci_parse_dt(struct platform_device *pde p->type = info->type; p->regtype = info->regtype; p->scscr = SCSCR_RE | SCSCR_TE; + if (of_property_read_bool(np, "ctsrts")) + p->capabilities = SCIx_HAVE_RTSCTS; return p; }