From patchwork Mon Feb 12 12:45:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 128024 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3173695ljc; Mon, 12 Feb 2018 04:45:50 -0800 (PST) X-Google-Smtp-Source: AH8x226Uo2bik9xxIRlzOK3erI4OFT0t0gmAMeXQZZvcYuqJepPGiym35cGpEV2WbBR4ZRMlkXBc X-Received: by 2002:a17:902:8498:: with SMTP id c24-v6mr10605951plo.450.1518439549956; Mon, 12 Feb 2018 04:45:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518439549; cv=none; d=google.com; s=arc-20160816; b=0R1O1wCs6S0Iagu/JwigZOMjS3sFKS2YGvycdI9Bh2NAwTesGhzKpkgGpEvhgpGr60 vncDEbWSm1d8JBwAZ6YAnYUla9kVYQuNL5j9MRL0RWs/SLOyjL4Brc1Rz038la678GIv 39GA5m5nfqGgnjTUgM6UmuoOnGUT0COoNTD1f+KTqjl8XQoi5+4JPGVdmV1diEq2iyZo SfjVsLWHegDzF7U9kvxjrjUX9pTtLfeg/m1Rlvi/SM4YgCa8NSBohOeDVzNLai9TVbLp /ajSKSOjJd+HvkaiCA6XJ6l5zOZFOnriwJhof2Q5AfoZtZNbZAzuOIyCr1NbKOUgVsQl ksIQ== 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=syL6cw3kAE/RFG+Y1+sYGwWmGwR5zVcw2gKMnGqldXE=; b=D+R+yX9HFKVjApM95aO4wle7RmIG8oV7f3B/nj8vGMJgmjuwVnHBAp9Rb/819Tyd/2 MP34ORmnzeAqi7vaGhWM/lY57AgetIClMchctT2OACO7ncek4wNcVpmoqYMN1MI0OKzj rMWsK+F+8KpUMt2q8wc6i4A4I4AzoKCrQWNt7VlXlixeRVSl35Y1g1KDh3u/81z5rquQ naIuMzEwyvHBWUxFe5fo6dn3dPVD+8u0mE3axFaABoU0Y2rsnZHAIxpkNl1L87NTgxbY ODW0sm7dU2wmJbO8JckLItsEt1pt6vcNQ0baTqk4vo9HPaZddkBAIZzNaMC6GiE739jC 9szQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=L1I42xlV; 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 l14si5129059pgs.521.2018.02.12.04.45.49; Mon, 12 Feb 2018 04:45:49 -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=L1I42xlV; 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 S933072AbeBLMpt (ORCPT + 1 other); Mon, 12 Feb 2018 07:45:49 -0500 Received: from mail-lf0-f68.google.com ([209.85.215.68]:39652 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934684AbeBLMpr (ORCPT ); Mon, 12 Feb 2018 07:45:47 -0500 Received: by mail-lf0-f68.google.com with SMTP id h78so13067238lfg.6 for ; Mon, 12 Feb 2018 04:45:47 -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=OSutiAVjE3Pld4Yf2nJpO1iHPNptZkp+ojfUCqd7y/Q=; b=L1I42xlV3aZOFppQl4fgksGYdIMgMmr+b2sSEO596YhUzxPad72031wFXEinX77sKW z3Mjqnc8kYe5vigzKTf/HDNvvQSSpgD1wO7nLM3jZ10bQp0siTF6o8xKP44diiJKesQB FZoKsijZL6sjiwnZq9fiilXB5TvkpVMxtItf8= 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=OSutiAVjE3Pld4Yf2nJpO1iHPNptZkp+ojfUCqd7y/Q=; b=X6C71RVrjGSzDcLI8yHaDTulV4Q+iYnk/bbay48FTBp7Zf2tOlgLJDZTbYJSgepDE9 Nd18TYUNr0ygSv7651Pvyf0sxyWxH8x6hERQPcSEHMN2Hg5B/3gUnRifNckRp3mqjFNa fQDRrkQI9qxh6P6O1xQh37ExA65HCXZTV7phMmiMhhO1evxQPEV1445qEQU1Guynp4ZO S1dlABig7rc2nDRWKHM3n7LiZ9w9ebJ+015Vh+fR4xvpMzfUs/NcyznXiTGgDpU6cEBZ kxpaPjYN1mz7Mer2pJaig3d/fi9dB1+PjwJfIktPrmLeSjI0DHVP4PbDtKk4ta0DOQs8 dLLA== X-Gm-Message-State: APf1xPCKwE0zQUw3vwv7lTIRUcaEdStfutPOhKY5P1P/w+KUmHTgTPF6 TzmwCmqIS14c6+025IXYzbnhqMzpVKQ= X-Received: by 10.25.20.31 with SMTP id k31mr7643422lfi.87.1518439546487; Mon, 12 Feb 2018 04:45:46 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 5sm1588740ljv.29.2018.02.12.04.45.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 04:45:45 -0800 (PST) From: Linus Walleij To: Mark Brown , linux-spi@vger.kernel.org Cc: linux-gpio@vger.kernel.org, Linus Walleij Subject: [PATCH 2/3] spi: spi-gpio: Delete references to non-GENERIC_BITBANG Date: Mon, 12 Feb 2018 13:45:31 +0100 Message-Id: <20180212124532.25776-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212124532.25776-1-linus.walleij@linaro.org> References: <20180212124532.25776-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 b85a93cad44a..2e5f092813f1 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c @@ -53,34 +53,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 /*----------------------------------------------------------------------*/ @@ -362,10 +336,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)); if (!master)