From patchwork Tue Jan 3 23:06:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9495837 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E1364606B5 for ; Tue, 3 Jan 2017 23:06:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D477B26E82 for ; Tue, 3 Jan 2017 23:06:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8F0B27D13; Tue, 3 Jan 2017 23:06:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AADBA2787C for ; Tue, 3 Jan 2017 23:06:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964831AbdACXGv (ORCPT ); Tue, 3 Jan 2017 18:06:51 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:59075 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936236AbdACXGr (ORCPT ); Tue, 3 Jan 2017 18:06:47 -0500 Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 03BC920873; Wed, 4 Jan 2017 00:06:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1483484777; bh=bpEPl22n+A7GPdzkBN2j75jAUIhxcZEQ73iAbelMxik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YWokI2PG1hEXJ1SDu8aXja4UdLn6BUIdQtzGan/tJJL4UPK6yVaDx6b+LSU+Sz0Wm vsO8dyE8PBCWjeuVZ5kz4IPMQ8D4yKVeySsYx2eYTMBOV8Pk/2kOVi9ZpXPidvV5Xc 5lZVpif76ZGHSLhD/7W+hwSjyBmceQBTh9PfY4ag= From: Laurent Pinchart To: linux-renesas-soc@vger.kernel.org Cc: linux-sh@vger.kernel.org, linux-serial@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 07/19] sh: Don't set sh-sci port_reg Date: Wed, 4 Jan 2017 01:06:27 +0200 Message-Id: <20170103230639.19660-8-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170103230639.19660-1-laurent.pinchart+renesas@ideasonboard.com> References: <20170103230639.19660-1-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver considers all negative or zero values of the port_reg field as invalid. The four platforms that set the field to a register address all use an address higher than 0x7fffffff, which is thus considered by the driver as invalid. The feature is thus never used, remove it. The feature could be implemented properly in the future using the pinctrl and GPIO APIs if desired. While at it, don't set the field to SCIx_NOT_SUPPORTED (-1) either, leaving it unset leads to the same result. This will allow removing the SCIx_NOT_SUPPORTED macro. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven --- arch/sh/kernel/cpu/sh3/setup-sh770x.c | 2 -- arch/sh/kernel/cpu/sh4/setup-sh7750.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 1 - arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 6 ------ arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 6 ------ 5 files changed, 16 deletions(-) diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c index e64fe24d860c..e1e54258b822 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c @@ -109,7 +109,6 @@ static struct platform_device rtc_device = { }; static struct plat_sci_port scif0_platform_data = { - .port_reg = 0xa4000136, .type = PORT_SCI, .ops = &sh770x_sci_port_ops, .regshift = 1, @@ -156,7 +155,6 @@ static struct platform_device scif1_device = { #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \ defined(CONFIG_CPU_SUBTYPE_SH7709) static struct plat_sci_port scif2_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .type = PORT_IRDA, .ops = &sh770x_sci_port_ops, .regshift = 1, diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index f693f122a286..d98a55416306 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c @@ -38,7 +38,6 @@ static struct platform_device rtc_device = { }; static struct plat_sci_port sci_platform_data = { - .port_reg = 0xffe0001C, .type = PORT_SCI, .regshift = 2, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c index 3fc1a3ab634e..646918713d9a 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c @@ -20,7 +20,6 @@ #include static struct plat_sci_port scif0_platform_data = { - .port_reg = 0xa405013e, .scscr = SCSCR_REIE, .type = PORT_SCIF, }; diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 9f47ec950af8..6c5cb234aa33 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c @@ -23,7 +23,6 @@ /* Serial */ static struct plat_sci_port scif0_platform_data = { - .port_reg = 0xa4050160, .scscr = SCSCR_REIE, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, @@ -45,7 +44,6 @@ static struct platform_device scif0_device = { }; static struct plat_sci_port scif1_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .scscr = SCSCR_REIE, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, @@ -67,7 +65,6 @@ static struct platform_device scif1_device = { }; static struct plat_sci_port scif2_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .scscr = SCSCR_REIE, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, @@ -89,7 +86,6 @@ static struct platform_device scif2_device = { }; static struct plat_sci_port scif3_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .scscr = SCSCR_REIE, .sampling_rate = 8, .type = PORT_SCIFA, @@ -111,7 +107,6 @@ static struct platform_device scif3_device = { }; static struct plat_sci_port scif4_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .scscr = SCSCR_REIE, .sampling_rate = 8, .type = PORT_SCIFA, @@ -133,7 +128,6 @@ static struct platform_device scif4_device = { }; static struct plat_sci_port scif5_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .scscr = SCSCR_REIE, .sampling_rate = 8, .type = PORT_SCIFA, diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index 3ce55884c787..c20258b18775 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c @@ -290,7 +290,6 @@ static struct platform_device dma1_device = { /* Serial */ static struct plat_sci_port scif0_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .scscr = SCSCR_REIE, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, @@ -312,7 +311,6 @@ static struct platform_device scif0_device = { }; static struct plat_sci_port scif1_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .scscr = SCSCR_REIE, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, @@ -334,7 +332,6 @@ static struct platform_device scif1_device = { }; static struct plat_sci_port scif2_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .scscr = SCSCR_REIE, .type = PORT_SCIF, .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, @@ -356,7 +353,6 @@ static struct platform_device scif2_device = { }; static struct plat_sci_port scif3_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .sampling_rate = 8, .type = PORT_SCIFA, }; @@ -377,7 +373,6 @@ static struct platform_device scif3_device = { }; static struct plat_sci_port scif4_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .sampling_rate = 8, .type = PORT_SCIFA, }; @@ -398,7 +393,6 @@ static struct platform_device scif4_device = { }; static struct plat_sci_port scif5_platform_data = { - .port_reg = SCIx_NOT_SUPPORTED, .sampling_rate = 8, .type = PORT_SCIFA, };