From patchwork Thu Mar 17 13:47:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 8611191 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3260C9FC57 for ; Thu, 17 Mar 2016 13:47:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BFBF201F5 for ; Thu, 17 Mar 2016 13:47:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C475B2034F for ; Thu, 17 Mar 2016 13:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936131AbcCQNrk (ORCPT ); Thu, 17 Mar 2016 09:47:40 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38952 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936127AbcCQNrd (ORCPT ); Thu, 17 Mar 2016 09:47:33 -0400 Received: from ayla.of.borg ([84.195.106.123]) by xavier.telenet-ops.be with bizsmtp id X1nU1s00K2fm56U011nUmW; Thu, 17 Mar 2016 14:47:29 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1agYGu-0001C5-Gn; Thu, 17 Mar 2016 14:47:28 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1agYGx-0003Dq-4K; Thu, 17 Mar 2016 14:47:31 +0100 From: Geert Uytterhoeven To: Greg Kroah-Hartman , Jiri Slaby , Peter Hurley , Magnus Damm Cc: Laurent Pinchart , Yoshinori Sato , linux-serial@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-sh@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFC 5/5] serial: sh-sci: Replace SCIx_HAVE_RTSCTS by standard UPF_HARD_FLOW Date: Thu, 17 Mar 2016 14:47:29 +0100 Message-Id: <1458222449-12324-6-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458222449-12324-1-git-send-email-geert+renesas@glider.be> References: <1458222449-12324-1-git-send-email-geert+renesas@glider.be> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Replace the custom SCIx_HAVE_RTSCTS flag in the plat_sci_port.capabilities field by the standard UPF_HARD_FLOW flag in the uart_port.flags and plat_sci_port.flags fields. Remove the now unused plat_sci_port.capabilities field. Legacy pllatform data can enable UPF_HARD_FLOW in plat_sci_port.flags. Note that currently nothing sets the SCIx_HAVE_RTSCTS flag. Signed-off-by: Geert Uytterhoeven --- drivers/tty/serial/sh-sci.c | 4 ++-- include/linux/serial_sci.h | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 6897100ed5197df3..51b436e2334c3efc 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -720,7 +720,7 @@ static void sci_init_pins(struct uart_port *port, unsigned int cflag) if (!reg->size) return; - if ((s->cfg->capabilities & SCIx_HAVE_RTSCTS) && + if ((port->flags & UPF_HARD_FLOW) && ((!(cflag & CRTSCTS)))) { unsigned short status; @@ -2247,7 +2247,7 @@ done: if (reg->size) { unsigned short ctrl = serial_port_in(port, SCFCR); - if (s->cfg->capabilities & SCIx_HAVE_RTSCTS) { + if (port->flags & UPF_HARD_FLOW) { if (termios->c_cflag & CRTSCTS) ctrl |= SCFCR_MCE; else diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 9f2bfd0557429ac3..95640ee68462190f 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h @@ -48,17 +48,11 @@ struct plat_sci_port_ops { }; /* - * Port-specific capabilities - */ -#define SCIx_HAVE_RTSCTS BIT(0) - -/* * Platform device specific platform_data struct */ struct plat_sci_port { unsigned int type; /* SCI / SCIF / IRDA / HSCIF */ upf_t flags; /* UPF_* flags */ - unsigned long capabilities; /* Port features/capabilities */ unsigned int sampling_rate; unsigned int scscr; /* SCSCR initialization */