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: 123066 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7869171qgn; Mon, 1 Jan 2018 05:38:31 -0800 (PST) X-Google-Smtp-Source: ACJfBovXuQwFRzKspXZNP/tqG7oip8IE1zoC4NuOvH5ckHDGK/KnRhNnNhE6zmubrHPz16OJi9au X-Received: by 10.98.57.131 with SMTP id u3mr42495068pfj.7.1514813911704; Mon, 01 Jan 2018 05:38:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514813911; cv=none; d=google.com; s=arc-20160816; b=KClkwkR77nGwhy5A1LH2iXidRPiYqGLaL4AN5BXldk15m3ibVhd6hhaabba3XnKKNO ubUSK6jTRGTAgQOQ31qX9jIr8mGdeB5ffkshWvTbNfFjlkMZRFc5TT77BgWJxOdUmrAh ircL2PRgmt0lIcdMZLiwuTN3IlGjCus4nckPFBNZk/Et7PVGbAMUMWyUX68RynvmO4Vm AsR/Cc00Cri16yIfy2RIiMkyqHLE1IxLMmKk2rQSHX72OxYCd4H3F1vg/IyAJ7R4JyIP PybxlNQTYtXLeetMxTDnzPRJlGIgu4mTkBmR+/8LVmmKJH5RYSya7DqKvPZVWnTkzgcQ yucQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=8WCMth6VV0mKIH2SML0bXpSiRHHXPyeaRa4My0oY8ZY=; b=xQnc+yWTUrnTRNJN8Y2jYENYUsoqhxi5T2SbV3eFsId2X4lacdMSSz4oFCmjaxojMC blXlFicL2RXCbzinWu/V8bl/P3N8t0w0zLVdft51GF8l89+I3Y+zG4L46BWreI+l+6ZO sZnT36UDlqzwEYXxFMTvx4XHHNGl7Nww/6gTdoP49qu47muQ5jjDPqKCjUyFfziTJRVL LilJI0dZnqovcUfEDYLPx5vPUZ0xkUHzD9PRAp/cCdaRxt1/guUOZcKNPuC8Sv93EX0C CL2ALraYmrkBFi5S+PUU7udpJM1CGjDzQecua/tFPbgZQp29qTkGMBll7HsXhkO6bRZR +jZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MT2BwCp4; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si8470380pga.543.2018.01.01.05.38.31; Mon, 01 Jan 2018 05:38:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MT2BwCp4; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751380AbeAANib (ORCPT + 1 other); 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-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 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(-) -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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));