From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 AACFB489865 for ; Fri, 31 Jul 2026 09:38:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785490718; cv=none; b=f6ZC5KtS9KdKk4UDO6KrAmvezHOBlWtejaC15VWGq0juExSHxguifrTqpwsyqgNbjetM6mdkHsA0H7bVoszbLQQXMYCFTqierOEDBfKiIBhudYxEN5375tQcI1NrDDzDTaTzUUWaFJLDXah/O1fD5xrAmNoLmpe0TiDcA9IODBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785490718; c=relaxed/simple; bh=GFbQsj/Fa6HhGL7RubWf2YXlykNHUoIjOC4IOocIdNE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=C/eg5nMaR9VFsJ7lA7xqpeQ9V+wvoIs1anLQwMJOehjnEee5m2/yZWhr0HGVrxb6msYHQ2ZQa6i00Wa7dkLEjjfvmL2SfjFRWZGGlWdO9Y2r/MfIw+54G1hCZR2Dc1mixe5XbbBl5fKdAWf/TKPo8lizZUW+jWat5/NrBDqd98M= 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=W5ztKtP1; arc=none smtp.client-ip=185.246.84.56 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="W5ztKtP1" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 552161A134E; Fri, 31 Jul 2026 09:38:28 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 27D176039A; Fri, 31 Jul 2026 09:38:28 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C43BD11C16612; Fri, 31 Jul 2026 11:38:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1785490703; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=eagIojVHgWT+H7k3TNqXh8GEjAI5dJTnFxCgsrPlEHY=; b=W5ztKtP1gTQCzfooqVs0s0UFs36u9r9nOtOVOwUCN3cNUDbeNwRRlvxIfqf8nGQOmXdBCg 7rT/YSIqwPxZ0OiIkoHMmz6aP93quIwkcX/0H83j9nhv5e4C0l7hltdrPEyOJ8nnyDbMsa 1rSXZT94F9aKHodQrq0jsTMspBlkqTACMwk4xxJy8RNMnPnQGftODF03BsXJmfsM58Qypy Sc/B2RBRu36VVw+Ljjxu+Igp2yn67YDWOStAtMYkxSRUQ4hKY3PfOk2ozO0PwNOM3E/4qS MZeZ3X5vA/6RIPFGwyuQKkTj6/2TP+HWKdceS+qnRpdJESr4PqMO/gCCWbEK5A== From: Miquel Raynal To: "Michael Walle" Cc: "Pratyush Yadav" , "Takahiro Kuwano" , "Richard Weinberger" , "Vignesh Raghavendra" , "Thomas Petazzoni" , "Steam Lin" , , Subject: Re: [PATCH 04/30] mtd: spi-nor: winbond: Make the RDCR fixup Winbond wide In-Reply-To: (Michael Walle's message of "Mon, 06 Jul 2026 16:11:31 +0200") References: <20260529-winbond-v7-1-spi-nor-jv-cleanup-v1-0-87e5d3122244@bootlin.com> <20260529-winbond-v7-1-spi-nor-jv-cleanup-v1-4-87e5d3122244@bootlin.com> User-Agent: mu4e 1.12.12; emacs 30.2 Date: Fri, 31 Jul 2026 11:38:19 +0200 Message-ID: <874ihfjy7o.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 On 06/07/2026 at 16:11:31 +02, "Michael Walle" wrote: > On Fri May 29, 2026 at 5:22 PM CEST, Miquel Raynal wrote: >> The top level paragraph of the QER field in the JESD216B mentions: >> >> "In this standard, [...] Status register 2 refers to the byte read >> using instruction 35h. Status register 2 is the second byte transferred >> in a Write Status (01h) command. [...]" >> >> Value 100b, named in Linux BFPT_DWORD15_QER_SR2_BIT1_NO_RD, does not >> mention anything about reads and only brings details about writes. >> >> This has been interpreted in the spi-nor core by the absence of read >> capability, but there is no explicit reason for that, except that there >> were probably some very old chips which didn't support command 35h. > > I agree. But making it a vendor default we always have to have an > entry. So if this is really for all winbond chips, we shall do a > catch all entry (like in macronix.c). Good catch, I didn't think about that. Added. [...] >> + if (nor->info->id->bytes[0] =3D=3D 0xef && >> + nor->info->id->bytes[1] > 0x30) >> + nor->flags &=3D ~SNOR_F_NO_READ_CR; > > This is somewhat hard to read and the byte[0] is redundant here. > Maybe you can come up with some macro magic sugar :) I dropped the first condition in the if which indeed is redundant. However I don't know how to make the remainder more explanatory, there is already a big comment telling why we do it. Thanks! Miqu=C3=A8l