From patchwork Thu May 25 04:30:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 9747679 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 ED4BD60209 for ; Thu, 25 May 2017 04:31:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16E2B2766D for ; Thu, 25 May 2017 04:31:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BA3F27852; Thu, 25 May 2017 04:31:40 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 B199A2766D for ; Thu, 25 May 2017 04:31:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941726AbdEYEbf (ORCPT ); Thu, 25 May 2017 00:31:35 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:53103 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941729AbdEYEav (ORCPT ); Thu, 25 May 2017 00:30:51 -0400 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 6057A84490; Thu, 25 May 2017 16:30:48 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail; t=1495686648; bh=SZoVktPart1hMgxcuO3rSYRUSNekf1agsgamk+7Q4Hk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qfKd5oGllp+f2GHmp3dKjzDNExr6EmrBMLDkrHAzzqXqXm6mzflC19ShiPyeE0yK3 W7kyXyjtWwyxt9oCrn5M3+cCZTzmC6wtp6jlPSgwiO4FGtdg/ozsId1oGdqj7wjcGE UNPVbvvL0IEJn1wd49f/nuG3XtzSUwn9zYtt3gm8= Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7, 5, 7, 9061) id ; Thu, 25 May 2017 16:30:48 +1200 Received: from chrisp-dl.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by smtp (Postfix) with ESMTP id CC18D13F248; Thu, 25 May 2017 16:30:48 +1200 (NZST) Received: by chrisp-dl.atlnz.lc (Postfix, from userid 1030) id 9087F1E1DA3; Thu, 25 May 2017 16:30:46 +1200 (NZST) From: Chris Packham To: broonie@kernel.org, andy.shevchenko@gmail.com, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, rmallon@gmail.com, shawnguo@kernel.org Cc: linux@armlinux.org.uk, Chris Packham , Hartley Sweeten , linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 5/5] ARM: ep93xx: remove chipselect from ep93xx_spi_info Date: Thu, 25 May 2017 16:30:43 +1200 Message-Id: <20170525043043.1930-6-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170525043043.1930-1-chris.packham@alliedtelesis.co.nz> References: <20170525043043.1930-1-chris.packham@alliedtelesis.co.nz> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that the driver has been updated to use gpiod there is no need to have platform data to define the SPI chipselects. We still need to define the number of chipselects used. Signed-off-by: Chris Packham --- arch/arm/mach-ep93xx/edb93xx.c | 7 +------ arch/arm/mach-ep93xx/simone.c | 7 +------ arch/arm/mach-ep93xx/vision_ep9307.c | 9 +-------- include/linux/platform_data/spi-ep93xx.h | 4 +--- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index 9042adfe03de..b8d354fc27f5 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c @@ -127,13 +127,8 @@ static struct gpiod_lookup_table edb93xx_gpios_table = { }, }; -static int edb93xx_spi_chipselects[] __initdata = { - EP93XX_GPIO_LINE_EGPIO6, -}; - static struct ep93xx_spi_info edb93xx_spi_info __initdata = { - .chipselect = edb93xx_spi_chipselects, - .num_chipselect = ARRAY_SIZE(edb93xx_spi_chipselects), + .num_chipselect = 1, }; static void __init edb93xx_register_spi(void) diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index f297a7a89ed9..cb6bc2e1670a 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c @@ -129,13 +129,8 @@ static struct gpiod_lookup_table simone_gpios_table = { }, }; -static int simone_spi_chipselects[] __initdata = { - EP93XX_GPIO_LINE_EGPIO1, -}; - static struct ep93xx_spi_info simone_spi_info __initdata = { - .chipselect = simone_spi_chipselects, - .num_chipselect = ARRAY_SIZE(simone_spi_chipselects), + .num_chipselect = 1, .use_dma = 1, }; diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c index 3d9c66bbf2af..494c55080472 100644 --- a/arch/arm/mach-ep93xx/vision_ep9307.c +++ b/arch/arm/mach-ep93xx/vision_ep9307.c @@ -256,15 +256,8 @@ static struct gpiod_lookup_table vision_gpios_table = { }, }; -static int vision_spi_chipselects[] __initdata = { - EP93XX_GPIO_LINE_EGPIO6, - EP93XX_GPIO_LINE_EGPIO7, - EP93XX_GPIO_LINE_G(2), -}; - static struct ep93xx_spi_info vision_spi_master __initdata = { - .chipselect = vision_spi_chipselects, - .num_chipselect = ARRAY_SIZE(vision_spi_chipselects), + .num_chipselect = 3, .use_dma = 1, }; diff --git a/include/linux/platform_data/spi-ep93xx.h b/include/linux/platform_data/spi-ep93xx.h index 171a271c2cbd..efcf33eff851 100644 --- a/include/linux/platform_data/spi-ep93xx.h +++ b/include/linux/platform_data/spi-ep93xx.h @@ -5,12 +5,10 @@ struct spi_device; /** * struct ep93xx_spi_info - EP93xx specific SPI descriptor - * @chipselect: array of gpio numbers to use as chip selects - * @num_chipselect: ARRAY_SIZE(chipselect) + * @num_chipselect: number chip selects supported * @use_dma: use DMA for the transfers */ struct ep93xx_spi_info { - int *chipselect; int num_chipselect; bool use_dma; };