From patchwork Sat Sep 12 16:06:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 7166831 Return-Path: X-Original-To: patchwork-linux-spi@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 E2BCD9F32B for ; Sat, 12 Sep 2015 16:08:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1027420803 for ; Sat, 12 Sep 2015 16:08:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2B1A820806 for ; Sat, 12 Sep 2015 16:08:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750842AbbILQIg (ORCPT ); Sat, 12 Sep 2015 12:08:36 -0400 Received: from arrakis.dune.hu ([78.24.191.176]:59483 "EHLO arrakis.dune.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751767AbbILQIY (ORCPT ); Sat, 12 Sep 2015 12:08:24 -0400 Received: from localhost (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 7112028C127; Sat, 12 Sep 2015 18:06:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Virus-Scanned: at arrakis.dune.hu Received: from localhost.localdomain (dslb-088-073-016-160.088.073.pools.vodafone-ip.de [88.73.16.160]) by arrakis.dune.hu (Postfix) with ESMTPSA id 5754728C123; Sat, 12 Sep 2015 18:06:26 +0200 (CEST) From: Jonas Gorski To: linux-spi@vger.kernel.org, linux-mips@linux-mips.org Cc: Mark Brown , Ralf Baechle , florian@openwrt.org Subject: [PATCH V2 2/6] spi/bcm63xx: always use a fixed number of CS Date: Sat, 12 Sep 2015 18:06:59 +0200 Message-Id: <1442074023-29840-3-git-send-email-jogo@openwrt.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1442074023-29840-1-git-send-email-jogo@openwrt.org> References: <1442074023-29840-1-git-send-email-jogo@openwrt.org> 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 We always pass 8 for the number of chip selects, so we can as well hardcode it to this number. Signed-off-by: Jonas Gorski --- v1 -> v2 * remove the platform_data member as well. arch/mips/bcm63xx/dev-spi.c | 1 - arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h | 1 - drivers/spi/spi-bcm63xx.c | 4 +++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/bcm63xx/dev-spi.c b/arch/mips/bcm63xx/dev-spi.c index ad448e4..438df08 100644 --- a/arch/mips/bcm63xx/dev-spi.c +++ b/arch/mips/bcm63xx/dev-spi.c @@ -55,7 +55,6 @@ static struct resource spi_resources[] = { static struct bcm63xx_spi_pdata spi_pdata = { .bus_num = 0, - .num_chipselect = 8, }; static struct platform_device bcm63xx_spi_device = { diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h index 2573765..40dab9d 100644 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_spi.h @@ -12,7 +12,6 @@ struct bcm63xx_spi_pdata { unsigned int msg_type_shift; unsigned int msg_ctl_width; int bus_num; - int num_chipselect; }; enum bcm63xx_regs_spi { diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 2b908db..a997c64 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c @@ -31,6 +31,8 @@ #define BCM63XX_SPI_MAX_PREPEND 15 +#define BCM63XX_SPI_MAX_CS 8 + struct bcm63xx_spi { struct completion done; @@ -368,7 +370,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) } master->bus_num = pdata->bus_num; - master->num_chipselect = pdata->num_chipselect; + master->num_chipselect = BCM63XX_SPI_MAX_CS; master->transfer_one_message = bcm63xx_spi_transfer_one; master->mode_bits = MODEBITS; master->bits_per_word_mask = SPI_BPW_MASK(8);