From nobody Tue May 13 11:29:01 2025 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 DDD8C1F4C99 for <linux-kernel@vger.kernel.org>; Thu, 3 Apr 2025 09:19:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743671966; cv=none; b=i7LoJDBcY8C1iGVs10LdHYWTAYJCRmN2KvZ2bWnt/0n65RjGrMHrww7fcc4sdlQbwtXSACeZfEmnEYEzItdIRPmWdCEkI0uT+2RLz21Md96v27VRMLAe/6Gu1uyvfiliB0Yp0+muW2t1iKyhhk042icLGFRlxOBenN8j0cyE4BU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743671966; c=relaxed/simple; bh=lCxRybtO7xwrfjTxoWNqtwdqE6Gk9dfotoHrH6gdGWs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nyfNzKMFdBG0Z8JxVSJ1ZeAiRdq9EAvNs2sKdMjUoDW4BZLiXHX4M9zEGQDQDuw6/G7pgjey4fuCEAPj3/Myirkpzi8lA6yiAA0htbGHq/ZGiZ7lC2klmEtFOXaeLYz5oH8J7+oA1HG1y+/EjmloiNYid81NniFhbnPlTj/hxgw= 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=Kqxamz0K; arc=none smtp.client-ip=217.70.183.200 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="Kqxamz0K" Received: by mail.gandi.net (Postfix) with ESMTPSA id 0D3744419B; Thu, 3 Apr 2025 09:19:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1743671963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r31hfE5a/YZXsspQn0xCZWVi5fZer8H8O982t0puyPM=; b=Kqxamz0K63hOL4qj3fFfC9AZMGruGHDmDGTNxBz4xafTMk4C4buL7v1N3FbrOYunDuKx2e pfaebJtQuHJKmEud2SANTP/sN99WXcy2jNAcULMHrpFGhWnCWmC/Gka+7Z5FocCcRDJ0Bu yR8Z+0A763MbQ4oAV6pllNzzndTOgtS46skzdeOUW02s7A63nXXJUmlhjRSAaK4klY8Ohx 6f9TbmA/4zxiWQJnymMfwGOOe+cSPjocl4Eul/qHxcXUib/HDBKho46rUTJxyQZauz663C KC/suxR38HHLvKgSKUghrmGp77s2kRJ8ZXGTF84U9fBTvyelTnkkOZHR4Dk6rQ== From: Miquel Raynal <miquel.raynal@bootlin.com> Date: Thu, 03 Apr 2025 11:19:12 +0200 Subject: [PATCH v2 02/19] mtd: spinand: Use more specific naming for the write enable/disable op Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250403-winbond-6-14-rc1-octal-v2-2-7846bd88fe83@bootlin.com> References: <20250403-winbond-6-14-rc1-octal-v2-0-7846bd88fe83@bootlin.com> In-Reply-To: <20250403-winbond-6-14-rc1-octal-v2-0-7846bd88fe83@bootlin.com> To: Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Santhosh Kumar K <s-k6@ti.com> Cc: Tudor Ambarus <tudor.ambarus@linaro.org>, Pratyush Yadav <pratyush@kernel.org>, Michael Walle <michael@walle.cc>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Steam Lin <stlin2@winbond.com>, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Miquel Raynal <miquel.raynal@bootlin.com> X-Mailer: b4 0.15-dev X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddukeekudelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomhepofhiqhhuvghlucftrgihnhgrlhcuoehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpeelgfehvdduieefieeikeffgffggfdttdeugeffieetheeuleelfeehffdtffetveenucfkphepledvrddukeegrdduuddtrdduleelnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepledvrddukeegrdduuddtrdduleelpdhhvghloheplgduledvrdduieekrddurddutdeingdpmhgrihhlfhhrohhmpehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeduuddprhgtphhtthhopehsthhlihhnvdesfihinhgsohhnugdrtghomhdprhgtphhtthhopehprhgrthihuhhshheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqmhhtugeslhhishhtshdrihhnfhhrrgguvggrugdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrihgthhgrrhgus ehnohgurdgrthdprhgtphhtthhopehmihhquhgvlhdrrhgrhihnrghlsegsohhothhlihhnrdgtohhmpdhrtghpthhtohepthhuughorhdrrghmsggrrhhusheslhhinhgrrhhordhorhhgpdhrtghpthhtohepshdqkheisehtihdrtghomh X-GND-Sasl: miquel.raynal@bootlin.com SPI operations have been initially described through macros implicitly implying the use of a single SPI SDR bus. Macros for supporting dual and quad I/O transfers have been added on top, generally inspired by vendor naming, followed by DTR operations. Soon we might see octal and even octal DTR operations as well (including the opcode byte). Let's clarify what the macro really means by describing the expected bus topology in the write enable/disable macro names. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org> --- drivers/mtd/nand/spi/core.c | 2 +- include/linux/mtd/spinand.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index ea6b48242ad4a4e51c713907ce5cc55022cdb569..bbf0048104aac86e90b0706793d= b8503c8fc2a3b 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -362,7 +362,7 @@ static void spinand_ondie_ecc_save_status(struct nand_d= evice *nand, u8 status) =20 static int spinand_write_enable_op(struct spinand_device *spinand) { - struct spi_mem_op op =3D SPINAND_WR_EN_DIS_OP(true); + struct spi_mem_op op =3D SPINAND_WR_EN_DIS_1S_0_0_OP(true); =20 return spi_mem_exec_op(spinand->spimem, &op); } diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index a77eaadf23ab402bab346a59c224cda3acb9ee64..a69feaec711b585b1fd95d8a699= be9230c13c324 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -26,7 +26,7 @@ SPI_MEM_OP_NO_DUMMY, \ SPI_MEM_OP_NO_DATA) =20 -#define SPINAND_WR_EN_DIS_OP(enable) \ +#define SPINAND_WR_EN_DIS_1S_0_0_OP(enable) \ SPI_MEM_OP(SPI_MEM_OP_CMD((enable) ? 0x06 : 0x04, 1), \ SPI_MEM_OP_NO_ADDR, \ SPI_MEM_OP_NO_DUMMY, \ --=20 2.48.1