Message ID | 20190107092823.11188-1-frieder.schrempf@kontron.de |
---|---|
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kontron.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hScg3/W8"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43Y98l36WFz9sDn for <incoming@patchwork.ozlabs.org>; Mon, 7 Jan 2019 20:29:59 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XUdKWSMS60IkTBNFX2yqi07Cr2yyV8/hekRVHuCbj2k=; b=hScg3/W8okRpNo ttcOxB/YhdaLyse7MeKmtCsjBeRsPvphqIBWdmd70+RCxOlrmYVU1s7fA5/i5BgxVraCLm1JJMo7k HVNG03wJwY/52GpFLNKFaCQ/vNCEONRaOwxQ8z4QrKzaH/ST4gR0Jr9zJ/E8SK/ALATDnGLDBhqpe Q1B/uO8cLPfNTGDF9KETcrgFmZbQfzwPDt17Wxln3S973FZCgyptyiMH0Rln0KtUEe1o0PDpmkjrq /GZ06kIwxrPGsoXg6zXZ/U3kSHjiWsXy0CX/5gcPBkQIv8oxjmDG5bDDjup2D5dB0i8px/2p3yw6O JmS49COGi9Gb2/+JjaVA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggREH-0005ti-KV; Mon, 07 Jan 2019 09:29:53 +0000 Received: from skedge03.snt-world.com ([91.208.41.68]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggRED-0005rm-0m for linux-mtd@lists.infradead.org; Mon, 07 Jan 2019 09:29:51 +0000 Received: from sntmail11s.snt-is.com (unknown [10.203.32.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by skedge03.snt-world.com (Postfix) with ESMTPS id 7E10367B8C2; Mon, 7 Jan 2019 10:29:39 +0100 (CET) Received: from sntmail12r.snt-is.com (10.203.32.182) by sntmail11s.snt-is.com (10.203.32.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1466.3; Mon, 7 Jan 2019 10:29:39 +0100 Received: from sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305]) by sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305%5]) with mapi id 15.01.1466.003; Mon, 7 Jan 2019 10:29:39 +0100 From: Schrempf Frieder <frieder.schrempf@kontron.de> To: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>, "boris.brezillon@bootlin.com" <boris.brezillon@bootlin.com>, "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>, "broonie@kernel.org" <broonie@kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: [PATCH v8 0/7] Port the FSL QSPI driver to the SPI framework Thread-Topic: [PATCH v8 0/7] Port the FSL QSPI driver to the SPI framework Thread-Index: AQHUpmuCLFAseRXtEEO3Ywsh8i+t2w== Date: Mon, 7 Jan 2019 09:29:39 +0000 Message-ID: <20190107092823.11188-1-frieder.schrempf@kontron.de> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.9.42] x-c2processedorg: 51b406b7-48a2-4d03-b652-521f56ac89f3 MIME-Version: 1.0 X-SnT-MailScanner-Information: Please contact the ISP for more information X-SnT-MailScanner-ID: 7E10367B8C2.AFDBA X-SnT-MailScanner: Found to be clean X-SnT-MailScanner-SpamCheck: X-SnT-MailScanner-From: frieder.schrempf@kontron.de X-SnT-MailScanner-To: boris.brezillon@bootlin.com, broonie@kernel.org, computersforpeace@gmail.com, david.wolfe@nxp.com, dwmw2@infradead.org, fabio.estevam@nxp.com, han.xu@nxp.com, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, marek.vasut@gmail.com, miquel.raynal@bootlin.com, prabhakar.kushwaha@nxp.com, richard@nod.at, shawnguo@kernel.org, yogeshnarayan.gaur@nxp.com X-Spam-Status: No X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190107_012949_388880_EECFFB71 X-CRM114-Status: GOOD ( 16.36 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [91.208.41.68 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 T_FILL_THIS_FORM_SHORT Fill in a short form with personal information X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Cc: "yogeshnarayan.gaur@nxp.com" <yogeshnarayan.gaur@nxp.com>, "richard@nod.at" <richard@nod.at>, "shawnguo@kernel.org" <shawnguo@kernel.org>, "marek.vasut@gmail.com" <marek.vasut@gmail.com>, "han.xu@nxp.com" <han.xu@nxp.com>, "prabhakar.kushwaha@nxp.com" <prabhakar.kushwaha@nxp.com>, Schrempf Frieder <frieder.schrempf@kontron.de>, "miquel.raynal@bootlin.com" <miquel.raynal@bootlin.com>, "fabio.estevam@nxp.com" <fabio.estevam@nxp.com>, "david.wolfe@nxp.com" <david.wolfe@nxp.com>, "computersforpeace@gmail.com" <computersforpeace@gmail.com>, "dwmw2@infradead.org" <dwmw2@infradead.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
Port the FSL QSPI driver to the SPI framework
|
expand
|
From: Frieder Schrempf <frieder.schrempf@kontron.de> Now that the SPI memory interface was introduced by Boris, it is possible to move drivers from mtd/spi-nor to the SPI framework in order to use them for different type of SPI memory chips. Patch 1 adds the driver for the Freescale QSPI controller to the SPI framework. Together with m25p80.c it can be used to interface SPI NOR flashes just as the old driver did. The new driver replaces the old one by reusing its Kconfig option. Patch 2 moves the bindings to the correct place and patch 3 adjusts the bindings for the new driver. Patch 4 removes the code of the old driver. Patch 5 and 6 remove 'fsl,qspi-has-second-chip' from the devicetrees. Patch 7 adjusts the MAINTAINERS file. The new driver was tested with the following setups: * i.MX6UL and a Micron SPI NOR @ 60MHz. * i.MX6UL and a Toshiba TC58CVG2S0H SPI NAND flash. * LS1088ARDB with two SPI NOR chips connected to CS0 and CS1 (Yogesh Gaur) * Other i.MX platforms (Han Xu) The read performance of the new driver is almost the same or even better than the old driver, depending on the block size. The write performance is a bit slower on average (~10-15%). --- Changes in v8: ============== * Rebase on top of v5.0-rc1 * Add A-b, R-b and T-b tags * Update cover letter Changes in v7: ============== * Remove unused variables in fsl_qspi_select_mem() * Update cover letter Changes in v6: ============== * Add a quirk for LS2080A SoC to fix multi chip setup * Use separate area in AHB memory map for each chip * Add R-b tags for binding changes Changes in v5: ============== * Change SoB tags and commit author to new e-mail address * Drop change in compatible string of bindings * Reset the AHB domain * Drop the defconfig changes and reuse the Kconfig option of the old driver * Remove unused read()/write() pointers from struct fsl_qspi * Remove unused enum fsl_qspi_devtype * Fix break condition for fsl_qspi_readl_poll_tout() Changes in v4: ============== * Rebase on top of v4.20-rc1 * Drop patches that were merged separately * Address change of company name and email address * Use readl_poll_timeout() instead of busy waiting * Revert change to use callback functions for register read/write * Avoid divide by zero by checking op->dummy.nbytes * Make big-endian setting SoC-specific and don't read it from devicetree * Improve some register macros and masks Changes in v3: ============== * Move fix for typo in spi-mem.h to a separate patch * Fix documentation of spi_mem_get_name() and get_name() * Avoid overwriting the name of the memory device in probe of m25p80 * Add Suggested-by tags Changes in v2: ============== * Rebase on top of nand/next * Add a name field to struct spi_mem and fill it while probing * Add Yogesh Gaur and Suresh Gupta as authors * Use GENMASK() for generating bitmasks * Use callback functions for read/write of registers * Attach the seq variable to the selected CS * Avoid using conditional in read/write loop * Avoid infinite loop and use a timeout instead * Return error pointer when allocation in fsl_qspi_get_name() fails * Remove redundant iounmap() * Put suspend()/resume() in dev_pm_ops instead of platform_driver * Split the moving and editing of the dt-bindings in two patches --- Frieder Schrempf (7): spi: Add a driver for the Freescale/NXP QuadSPI controller dt-bindings: spi: Move the bindings for the FSL QSPI driver dt-bindings: spi: Adjust the bindings for the FSL QSPI driver mtd: fsl-quadspi: Remove the driver as it was replaced by spi-fsl-qspi.c ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used ARM64: dts: ls1046a: Remove fsl,qspi-has-second-chip as it is not used MAINTAINERS: Move the Freescale QSPI driver to the SPI framework .../fsl-quadspi.txt => spi/spi-fsl-qspi.txt} | 18 +- MAINTAINERS | 4 +- arch/arm/boot/dts/ls1021a-moxa-uc-8410a.dts | 1 - .../arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 1 - drivers/mtd/spi-nor/Kconfig | 9 - drivers/mtd/spi-nor/Makefile | 1 - drivers/mtd/spi-nor/fsl-quadspi.c | 1224 ----------------- drivers/spi/Kconfig | 11 + drivers/spi/Makefile | 1 + drivers/spi/spi-fsl-qspi.c | 966 +++++++++++++ 10 files changed, 988 insertions(+), 1248 deletions(-) rename Documentation/devicetree/bindings/{mtd/fsl-quadspi.txt => spi/spi-fsl-qspi.txt} (73%) delete mode 100644 drivers/mtd/spi-nor/fsl-quadspi.c create mode 100644 drivers/spi/spi-fsl-qspi.c