Message ID | 20210507131756.17028-1-patrice.chotard@foss.st.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-spi-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 447E7C43470 for <linux-spi@archiver.kernel.org>; Fri, 7 May 2021 13:18:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E60D6147D for <linux-spi@archiver.kernel.org>; Fri, 7 May 2021 13:18:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236717AbhEGNTa (ORCPT <rfc822;linux-spi@archiver.kernel.org>); Fri, 7 May 2021 09:19:30 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:57586 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237163AbhEGNT2 (ORCPT <rfc822;linux-spi@vger.kernel.org>); Fri, 7 May 2021 09:19:28 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 147DD3K9030544; Fri, 7 May 2021 15:18:14 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=selector1; bh=qEpLoPkHkDO0KPGL9HESkeimlG06MUmm1JzHIHKO0Cg=; b=EHn6lMUIqgLjkv/iAHTgQM1mHzYNyT7y9PzftZ4TOjwJXUW93RZEKC6n+opj2oG/OnZR lbVtlgbfApEhuvayEVMZllcxEmuol+5Rm56HgzSYkgLkB0+AMDJg7pkk0fQlKW6y2cU+ wZKYa5qZmKA8F/2YjmIxSPWw18b8BCgEYTmrxkkb0+k14AmNHZ8u40UHR3M3GC76szc/ k2jS2IANMkOafOvu3HuSaN+SXALq9vjQl7TZhciYsqGIuUiFugExPBJd26kPLctAKUMv 7uNbED1Od97JxDYG/xvnxxnP3Wn24Q0HSvts0EgMonVvmJGCRVP3J9zeFNjK82P58sXB JQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 38csqbv68r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 May 2021 15:18:14 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1D36B10002A; Fri, 7 May 2021 15:18:13 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node3.st.com [10.75.127.6]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id E6018221F78; Fri, 7 May 2021 15:18:12 +0200 (CEST) Received: from localhost (10.75.127.50) by SFHDAG2NODE3.st.com (10.75.127.6) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 May 2021 15:18:12 +0200 From: <patrice.chotard@foss.st.com> To: Mark Brown <broonie@kernel.org>, Miquel Raynal <miquel.raynal@bootlin.com>, Vignesh Raghavendra <vigneshr@ti.com>, Boris Brezillon <boris.brezillon@collabora.com>, <linux-mtd@lists.infradead.org>, Alexandre Torgue <alexandre.torgue@foss.st.com>, <linux-spi@vger.kernel.org>, <linux-stm32@st-md-mailman.stormreply.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> CC: <patrice.chotard@foss.st.com>, <christophe.kerello@foss.st.com> Subject: [PATCH v2 0/3] MTD: spinand: Add spi_mem_poll_status() support Date: Fri, 7 May 2021 15:17:53 +0200 Message-ID: <20210507131756.17028-1-patrice.chotard@foss.st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG2NODE3.st.com (10.75.127.6) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-05-07_04:2021-05-06,2021-05-07 signatures=0 Precedence: bulk List-ID: <linux-spi.vger.kernel.org> X-Mailing-List: linux-spi@vger.kernel.org |
Series |
MTD: spinand: Add spi_mem_poll_status() support
|
expand
|
From: Patrice Chotard <patrice.chotard@foss.st.com> This series adds support for the spi_mem_poll_status() spinand interface. Some QSPI controllers allows to poll automatically memory status during operations (erase, read or write). This allows to offload the CPU for this task. STM32 QSPI is supporting this feature, driver update are also part of this series. Changes in v2: - Indicates the spi_mem_poll_status() timeout unit - Use 2-byte wide status register - Add spi_mem_supports_op() call in spi_mem_poll_status() - Add completion management in spi_mem_poll_status() - Add offload/non-offload case mangement in spi_mem_poll_status() - Optimize the non-offload case by using read_poll_timeout() - mask and match stm32_qspi_poll_status()'s parameters are 2-byte wide - Make usage of new spi_mem_finalize_op() API in stm32_qspi_wait_poll_status() Patrice Chotard (3): spi: spi-mem: add automatic poll status functions mtd: spinand: use the spi-mem poll status APIs spi: stm32-qspi: add automatic poll status feature drivers/mtd/nand/spi/core.c | 17 ++++---- drivers/spi/spi-mem.c | 71 +++++++++++++++++++++++++++++++ drivers/spi/spi-stm32-qspi.c | 81 ++++++++++++++++++++++++++++++++---- include/linux/mtd/spinand.h | 1 + include/linux/spi/spi-mem.h | 10 +++++ 5 files changed, 164 insertions(+), 16 deletions(-)