From patchwork Mon Jan 1 13:37:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10138551 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 192BF60362 for ; Mon, 1 Jan 2018 13:38:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B1082851B for ; Mon, 1 Jan 2018 13:38:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F41E528817; Mon, 1 Jan 2018 13:38:31 +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=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 97E682851B for ; Mon, 1 Jan 2018 13:38:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751380AbeAANib (ORCPT ); Mon, 1 Jan 2018 08:38:31 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:34802 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751111AbeAANia (ORCPT ); Mon, 1 Jan 2018 08:38:30 -0500 Received: by mail-wr0-f193.google.com with SMTP id 36so13228392wrh.1 for ; Mon, 01 Jan 2018 05:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5WN43FClogujTeThXlKh9X+8p4puU9QmBwKu1hVqQYw=; b=MT2BwCp4rQR5mWxtCjVscrkWKHGSmvEPNn+tHxRHjjvRcpxYHXKViMxzh/ytEYLxe0 O+9UtMS9/dZVFlxqiyouGn6+trgKH9ia5ObVAAH/l/i2s0xqBkoHrsmjZhA+eNArrWwK H5l3D6tVfAVWeOD/Xe8vSxDPBq9iXeacDUixc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5WN43FClogujTeThXlKh9X+8p4puU9QmBwKu1hVqQYw=; b=m3zzd93Gm339cgbSzhQY+yRWk+JRIQSaLb/m5YK8XykYuPSlWIoGot0nsYnpYOpzyd o3bMGihORfnF3xObbV8KldPrEl1CjKrkDfKVPUaA0u/S4DocxK/3kg84bCa2q+ed4oRd 6kCl61pSK6F/A0o344K2w3j+tLPRvo+/1+ftal4GRg9l1scnAsoBT5BDM7dhpwwFE3/v bSBwwh7qGAk7VR3ys45OTBETmiMqncXsBwjrPHQEzXLQ1vP73F9LMSbzh5t0IyBXw03H 0zCyoQk2Go0zXwUcerAA8v5lqIFL0RK2FBQaBmB7t1k9utgMd5trs5rOFeL0nNgQ/MQW r8qQ== X-Gm-Message-State: AKGB3mI2dbNxOCQVmcKKRdK4VldBBm4Nust/envdnQu2FLytxSsuVS3z Ww+ATbL29qPricUzcN/B32NmpQ== X-Google-Smtp-Source: ACJfBot+673yGAEwWnwNMS9ytAl1NzPSdIV/eAzUlrujBYaVwB2h93SfWjCt7kutkJRZRMvLVXTafw== X-Received: by 10.223.159.82 with SMTP id f18mr21424744wrg.219.1514813909583; Mon, 01 Jan 2018 05:38:29 -0800 (PST) Received: from localhost.localdomain (catv-80-98-14-92.catv.broadband.hu. [80.98.14.92]) by smtp.gmail.com with ESMTPSA id d7sm53491267wrd.54.2018.01.01.05.38.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jan 2018 05:38:28 -0800 (PST) From: Linus Walleij To: Mark Brown , linux-spi@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 5/5] spi: spi-gpio: Delete references to non-GENERIC_BITBANG Date: Mon, 1 Jan 2018 14:37:49 +0100 Message-Id: <20180101133749.29567-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180101133749.29567-1-linus.walleij@linaro.org> References: <20180101133749.29567-1-linus.walleij@linaro.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 The non-generic bitbang was a feature where a platform could optimize SPI bit-banging by inlining the routines to hammer GPIO lines into the GPIO bitbanging driver as direct register writes using a custom set of GPIO library calls. It does not work with multiplatform concepts, violates everything about how GPIO is made generic and is just generally a bad idea, even on legacy system. Also there is no single user in the entire kernel (for good reasons). Delete the remnants of this optimization. Signed-off-by: Linus Walleij --- drivers/spi/spi-gpio.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index c12e588e54e7..437b1cd4da71 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c @@ -54,34 +54,8 @@ struct spi_gpio { /*----------------------------------------------------------------------*/ -/* - * Because the overhead of going through four GPIO procedure calls - * per transferred bit can make performance a problem, this code - * is set up so that you can use it in either of two ways: - * - * - The slow generic way: set up platform_data to hold the GPIO - * numbers used for MISO/MOSI/SCK, and issue procedure calls for - * each of them. This driver can handle several such busses. - * - * - The quicker inlined way: only helps with platform GPIO code - * that inlines operations for constant GPIOs. This can give - * you tight (fast!) inner loops, but each such bus needs a - * new driver. You'll define a new C file, with Makefile and - * Kconfig support; the C code can be a total of six lines: - * - * #define DRIVER_NAME "myboard_spi2" - * #define SPI_MISO_GPIO 119 - * #define SPI_MOSI_GPIO 120 - * #define SPI_SCK_GPIO 121 - * #define SPI_N_CHIPSEL 4 - * #include "spi-gpio.c" - */ - #ifndef DRIVER_NAME #define DRIVER_NAME "spi_gpio" - -#define GENERIC_BITBANG /* vs tight inlines */ - #endif /*----------------------------------------------------------------------*/ @@ -363,10 +337,8 @@ static int spi_gpio_probe(struct platform_device *pdev) use_of = 1; pdata = dev_get_platdata(&pdev->dev); -#ifdef GENERIC_BITBANG if (!pdata || (!use_of && !pdata->num_chipselect)) return -ENODEV; -#endif master = spi_alloc_master(&pdev->dev, sizeof(*spi_gpio) + (sizeof(struct gpio_desc *) * pdata->num_chipselect));