From mboxrd@z Thu Jan 1 00:00:00 1970 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 689C2C61DB6 for ; Tue, 25 Aug 2026 09:09:44 +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:Message-ID:Date:References :In-Reply-To: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=zKGdX4zj/TDDmc6L2PLTPAR3zUR16Z9DQXb3MJRRUes=; b=iz5zlnvWC8mAGF 38MPRI/LP92nNrXgYC8YCHzo9u044q2zAqlsGTs7BSh8jBusZyF1rojIaN+yIFVH+YH7B7ln6PEnn FPIFG48MqTAkYnSaPzf6My9d6+9QVJA2eAK8p0VMUwarym34T2AWZWg80szfzQmr3rVwDM4DatQ6u ziosM42gQY9DGSsJSyQ9VkHH0mLbrtP2LtaRpqMynoEfPRJmKQgWXwFhjCJWbmLZabZo+Wy5cWgfn XZwcRn7rCDVH4oMVO7iQlyh8+uiVtXzDMx85n+ea3sZHh97Cu71JUlpPCueJV/eHUwCQ0wqugygYr G5zLybxUJfPlLYEnOpiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wynA7-00000000SEg-0hJf; Tue, 25 Aug 2026 09:09:43 +0000 Received: from smtpout-02.galae.net ([185.246.84.56]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wynA5-00000000SDq-13Rs for linux-mtd@lists.infradead.org; Tue, 25 Aug 2026 09:09:42 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 68F121A1766; Tue, 25 Aug 2026 09:09:39 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 36455604C4; Tue, 25 Aug 2026 09:09:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1DF7111C7A254; Tue, 25 Aug 2026 11:09:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1787648974; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=F/8obPya0bR43OsFeLX51PFCgxTY5HzLfgC/ACn/ZxE=; b=aF9qr1P2K/3TzXhNGkE0JLLN8833gl72fn5gWCNiJ2bZ/bFGthzSWEekgiEQUAFP0JAIJ4 BSt47QhWGJYN9NAiJY5G+MN8EsB0tq2Nqcj3cO2xgAdI7kax+3CnsRpcxFMtoTuVE6R1Mn 8CFMwU9vYVR0jEmSLEtNS85o8iK3xi7HzwiPLzgRAZ3BbDtn7L4JGT4cmvT/kXDZrV6+AR tz1/T1HiZ8l/a4i9MB+7IebYxaxfB8zeAU9hKWkn94TDVk2P8a0eemncw+gVdIFtsJsD2J soonhBZpQxZ2xrzyWk6HlDJsoanj2Dlhqr8DYCFOLmJ5RZLo4vmYpZHqNk0MUA== From: Miquel Raynal To: Dominique Martinet Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] mtd: spinand: winbond: enable continuous read for W25N04LW In-Reply-To: <20260814-w25n04lw-contread-v1-1-2968b07c962d@atmark-techno.com> (Dominique Martinet's message of "Fri, 14 Aug 2026 08:15:58 +0000") References: <20260814-w25n04lw-contread-v1-1-2968b07c962d@atmark-techno.com> User-Agent: mu4e 1.12.12; emacs 30.2 Date: Tue, 25 Aug 2026 11:09:33 +0200 Message-ID: <871pbmk1ma.fsf@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260825_020941_434921_212A2BFD X-CRM114-Status: GOOD ( 14.98 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org SGkgRG9taW5pcXVlLAoKT24gMTQvMDgvMjAyNiBhdCAwODoxNTo1OCBHTVQsIERvbWluaXF1ZSBN YXJ0aW5ldCA8ZG9taW5pcXVlLm1hcnRpbmV0QGF0bWFyay10ZWNobm8uY29tPiB3cm90ZToKCj4g VGhpcyBlbmFibGVzIGNvbnRpbnVvdXMgcmVhZCBmb3IgVzI1TjA0TFc6Cj4gLSBUaGUgb3BzIGFy ZSBiYXNpY2FsbHkgdGhlIHNhbWUgYXMgY29udF9yZWFkX2NhY2hlX2R1YWxfcXVhZF9kdHJfdmFy aWFudHMKPiB3aXRob3V0IHRoZSBzcGVlZCBsaW1pdCAodGhpcyBjaGlwIGhhcyBubyBIRlJFUSBm bGFnIHRoYXQgd291bGQgY2hhbmdlCj4gdGhlIHJlcXVpcmVkIGRlbGF5cykgYW5kIHdpdGhvdXQg RFRSIG9wcyAobm90IHN1cHBvcnRlZCkKPiAtIHcyNW4weGp3X3NldF9jb250X3JlYWQoKSBjYW4g YmUgcmV1c2VkCj4KPiBVbmZvcnR1bmF0ZWx5IG9uI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cj4gZXZlbnR1YWxseSBteXNlbGYgYWZ0ZXIgSSBoYXZlIHRpbWUgdG8gY2hlY2sgdGhlIFNQSSBk cml2ZXIuLi4pCj4KPiBGdW4gZmFjdDoKPiBuYW5kZHVtcCAtQyBpcyBhYm91dCA5JSBmYXN0ZXIg dGhhbiBuYW5kZHVtcCBvbiBsYXJnZSBkYXRhICh0cmllZCAxME1CKQo+IGV2ZW4gaWYgY29udGlu dW91cyByZWFkIGlzIG5vdCBzdXBwb3J0ZWQuCgpUaGF0IGlzIHN0cmFuZ2UuIElzIHRoaXMgcmVh bGx5IHJlcHJvZHVjaWJsZT8gQ2FuIHlvdSBkaXNhYmxlIENQVSBQTSBhbmQKdHJ5IGFnYWluPyBU aGVyZSBzaG91bGQgYmUgbm8gaW1wYWN0IGlmIGNvbnRpbnVvdXMgcmVhZCBpcyBkaXNhYmxlZC4K ClRoYW5rcywKTWlxdcOobAoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fCkxpbnV4IE1URCBkaXNjdXNzaW9uIG1haWxpbmcgbGlzdApodHRwOi8v bGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xpbnV4LW10ZC8K From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C9C43E95A8 for ; Tue, 25 Aug 2026 09:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787648983; cv=none; b=eUJvseGeLNIQ9zzZunMwNErzbx9fLTuZhLRD7y1SLK7+Z3n2Qf8NpGAoLZOei5Y8tCTnvLPYE64zrEzPwlS+5vWJiO9MmisZRcBVLAhjIWPVwCjwQfyMqr7qIksnJfhS8eQ7ggfgs3PiIODKpqMPeYbEpC9XJMBxDFpQx+ztPR0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787648983; c=relaxed/simple; bh=dom2js69urca1NHayFuUhsc9AosNczhnXyPSW/jXi9Y=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=nr3p+MBbNIFNInofgLEbAswEWlMhtXUw7mHgOEQff79PYBn5HIhwEQ1cqNbtrKy0C/4xKiOeaGZRPTTVQlbMPU1XzDXRDswLO5Rp4dM7aM8iQfJu3y0StJeRyO5O4pn9Bd64C3npusR72vYAEXIRTPPaqkzN8pAOmp69UZJr8NM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=aF9qr1P2; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="aF9qr1P2" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 67B394E412E5; Tue, 25 Aug 2026 09:09:39 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 36455604C4; Tue, 25 Aug 2026 09:09:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1DF7111C7A254; Tue, 25 Aug 2026 11:09:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1787648974; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=F/8obPya0bR43OsFeLX51PFCgxTY5HzLfgC/ACn/ZxE=; b=aF9qr1P2K/3TzXhNGkE0JLLN8833gl72fn5gWCNiJ2bZ/bFGthzSWEekgiEQUAFP0JAIJ4 BSt47QhWGJYN9NAiJY5G+MN8EsB0tq2Nqcj3cO2xgAdI7kax+3CnsRpcxFMtoTuVE6R1Mn 8CFMwU9vYVR0jEmSLEtNS85o8iK3xi7HzwiPLzgRAZ3BbDtn7L4JGT4cmvT/kXDZrV6+AR tz1/T1HiZ8l/a4i9MB+7IebYxaxfB8zeAU9hKWkn94TDVk2P8a0eemncw+gVdIFtsJsD2J soonhBZpQxZ2xrzyWk6HlDJsoanj2Dlhqr8DYCFOLmJ5RZLo4vmYpZHqNk0MUA== From: Miquel Raynal To: Dominique Martinet Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] mtd: spinand: winbond: enable continuous read for W25N04LW In-Reply-To: <20260814-w25n04lw-contread-v1-1-2968b07c962d@atmark-techno.com> (Dominique Martinet's message of "Fri, 14 Aug 2026 08:15:58 +0000") References: <20260814-w25n04lw-contread-v1-1-2968b07c962d@atmark-techno.com> User-Agent: mu4e 1.12.12; emacs 30.2 Date: Tue, 25 Aug 2026 11:09:33 +0200 Message-ID: <871pbmk1ma.fsf@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Hi Dominique, On 14/08/2026 at 08:15:58 GMT, Dominique Martinet wrote: > This enables continuous read for W25N04LW: > - The ops are basically the same as cont_read_cache_dual_quad_dtr_variants > without the speed limit (this chip has no HFREQ flag that would change > the required delays) and without DTR ops (not supported) > - w25n0xjw_set_cont_read() can be reused > > Unfortunately on my system (i.MX 8ULP LPSPI) the first time continuous > read is used spinand_read_from_cache_op() falls into this if and > disables continuous read, so this didn't go any further: Ah, too bad :-) > /* > * Dirmap accesses are allowed to toggle the CS. > * Toggling the CS during a continuous read is forbidden. > */ > if (nbytes && req->continuous) { > /* > * Spi controller with broken support of continuous > * reading was detected. Disable future use of > * continuous reading and return -EAGAIN to retry > * reading within regular mode. > */ > spinand->cont_read_possible =3D false; > return -EAGAIN; > } > > I'm leaving this patch for anyone who could have hardware for this (or > eventually myself after I have time to check the SPI driver...) > > Fun fact: > nanddump -C is about 9% faster than nanddump on large data (tried 10MB) > even if continuous read is not supported. That is strange. Is this really reproducible? Can you disable CPU PM and try again? There should be no impact if continuous read is disabled. Thanks, Miqu=C3=A8l