From patchwork Wed Feb 1 11:36:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 13124185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02CB3C636D3 for ; Wed, 1 Feb 2023 11:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UFePJCu/yKGdl3AUliTTYLgWao4hI2QKRUsp2Me5bRA=; b=m+gC3tQWIGqMRI FmIocNprbE6CJvK90CtBxJZrIelrHH3+4BvIT/FKHxa0IAp7lKyT/whwSq4iUJ8y3RuqIoB3t9Mhj A4thbpv2DrxMOCXkIgIhs3e9prP11v7q0/m8RiBdyXj524QdIpUv67LDQDN0Ts872wq3qnUDlYehi Wu3ZsK3/37mVOSagkVv5ULE/dRSqynrO5Yl8Jmkpt6jiGarprz73I9kIhAexwcLnSXu+AOxvDkXED lahUOVZ3d73ruRCWC1uNJjO4zwRHIyXjUXBrJtrLCSMk5dU7rkY/4zvAKqulpz8qCA+HIMgR73EiR QA3V/+Xvc5ph178H4HIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNBT2-00BXD7-Hu; Wed, 01 Feb 2023 11:39:58 +0000 Received: from relay10.mail.gandi.net ([2001:4b98:dc4:8::230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNBPX-00BVJh-9l; Wed, 01 Feb 2023 11:36:23 +0000 Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 72BDE240003; Wed, 1 Feb 2023 11:36:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1675251377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vusAQk75rDSbbPE6SL+e+4/i9FIAgdGw/4ol9sYcgNU=; b=GMb6fFR6V1iwv48moWa2H1T6hlxwchrjBRcckiB5VfhKanI/EY0QCfu6ArBi53Ojzu4d5+ 2anz4WZJlTkok0K0y/koncp0WAuV5R8vCjhYRI8UndRxgllyzO3aq/9uXJrQsa2EzGJJyL GlIk42C0lgch1r9PH0QhSPobemduItOGIcQxh3oXv2a0NSryWchTj67iBQL41M5esBKW8b ZtWCpMLsFLfj1zKAEBVi/ToMLwwl6RaCwp80p6GRuhBCam5mbhIY8jd6KVDRGTjUmxPr86 JXSyuUn3XZ83P+r0rYT/4yhYVNFm5drMiHLvDJII2Bw4XhE5cFQeGL6jWV+BxQ== From: Miquel Raynal To: Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Pratyush Yadav , Michael Walle , Cc: Julien Su , Jaime Liao , Jaime Liao , Alvin Zhou , Thomas Petazzoni , Michal Simek , , Miquel Raynal Subject: [PATCH v4 6/8] mtd: spi-nor: Add a RWW flag Date: Wed, 1 Feb 2023 12:36:01 +0100 Message-Id: <20230201113603.293758-7-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201113603.293758-1-miquel.raynal@bootlin.com> References: <20230201113603.293758-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230201_033619_562022_50BBC497 X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Introduce a new (no SFDP) flag for the feature that we are about to support: Read While Write. This means, if the chip has several banks and supports RWW, once a page of data to write has been transferred into the chip's internal SRAM, another read operation happening on a different bank can be performed during the tPROG delay. Adding this new flag involves enlarging the no_sfdp_flags variable to 16 bits. Signed-off-by: Miquel Raynal --- drivers/mtd/spi-nor/core.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h index 888a08c37d8c..aebd92f4884f 100644 --- a/drivers/mtd/spi-nor/core.h +++ b/drivers/mtd/spi-nor/core.h @@ -473,6 +473,7 @@ struct spi_nor_fixups { * SPI_NOR_OCTAL_READ: flash supports Octal Read. * SPI_NOR_OCTAL_DTR_READ: flash supports octal DTR Read. * SPI_NOR_OCTAL_DTR_PP: flash supports Octal DTR Page Program. + * SPI_NOR_RWW: flash supports reads while write. * * @fixup_flags: flags that indicate support that can be discovered via SFDP * ideally, but can not be discovered for this particular flash @@ -514,7 +515,7 @@ struct flash_info { #define SPI_NOR_NO_FR BIT(8) #define SPI_NOR_QUAD_PP BIT(9) - u8 no_sfdp_flags; + u16 no_sfdp_flags; #define SPI_NOR_SKIP_SFDP BIT(0) #define SECT_4K BIT(1) #define SPI_NOR_DUAL_READ BIT(3) @@ -522,6 +523,7 @@ struct flash_info { #define SPI_NOR_OCTAL_READ BIT(5) #define SPI_NOR_OCTAL_DTR_READ BIT(6) #define SPI_NOR_OCTAL_DTR_PP BIT(7) +#define SPI_NOR_RWW BIT(8) u8 fixup_flags; #define SPI_NOR_4B_OPCODES BIT(0)