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 31D4FC25B74 for ; Thu, 16 May 2024 13:05:34 +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:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gw46Fz5p6DYTUZ9c8vFm3QERUcaSpGdx6iU5YjbH3AU=; b=kGkcpPyjdO+DCP hHFX1uFJ7N+YijAhJpCVBB5pDFkoQyZb8cT3gVkB2STfussvaofz8edv+9Uvumo7rxHOxUNubadwj Xwp0IvLHTktZ6XpGQ4lpI13Xk6CCMHHiBKdbAyT47oxiSfnLLPs8AR/GdGnMckHe04kDHYy6aOusM onpCgfw3EekATF89e1Ese68hrc+L9Nm9x7fDnYMKzEOwdWiBOZKtLDPWjvh5VIbV9QBjLcDDjzt9J YYwXqNbVhlHJB8CIRvGxdnbzJJp2irAJv5qjSk9o654hEmE8HaLSHkyLexnogV530cRmgEL6tythk ahoGadZkniGR2dZkiJzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7anb-00000004vVL-1ZBw; Thu, 16 May 2024 13:05:31 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7anX-00000004vS7-3SQ5 for linux-mtd@lists.infradead.org; Thu, 16 May 2024 13:05:29 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 779A2FF810; Thu, 16 May 2024 13:05:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715864725; 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=tahKfh/1DJlK3/OTKCEXmpwJffF0zZ1wUE3RarZ3vao=; b=M5r7Jr1r0XfTPsjxh1qWfT090A+s4RSCwaxB6oe8GHVOsCU3RJ/lE5ilPZd4WP/7YY8r17 JhJi19gcZdy8hnovjQUx9DHGb1StGUXJFMqRv2PlomoOlgNxj/91ycHem84JhXwpFm0Uif RS1kBpeJAT4Sy0pB+3rwOjgoZzAe8+nsdOBjktHzso+pabO3pTWP/bmor3TkCWFfyLG2ga Wg05nAdMtk80eVJtcAkS4yPMlmkhRvgPZvWG5MOCbCilVGP9Avm1HN01BHLXIyAtPDmhBw OirXuwMxU9meBbhM5jiBNM51T5fldR7EcLJxuY3m0odJZBdTjNaEr4Oq1tbPcw== Date: Thu, 16 May 2024 15:05:24 +0200 From: Miquel Raynal To: Sascha Hauer Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] mtd: nand: mxc_nand: implement exec_op Message-ID: <20240516150524.24be4aeb@xps-13> In-Reply-To: References: <20240514-mtd-nand-mxc-nand-exec-op-v3-0-3e6f45fd3d82@pengutronix.de> <20240514-mtd-nand-mxc-nand-exec-op-v3-2-3e6f45fd3d82@pengutronix.de> <20240516103214.57a8ce33@xps-13> <20240516124405.2da1aa23@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: miquel.raynal@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240516_060528_076427_A2B96444 X-CRM114-Status: GOOD ( 18.17 ) 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 SGkgU2FzY2hhLAoKcy5oYXVlckBwZW5ndXRyb25peC5kZSB3cm90ZSBvbiBUaHUsIDE2IE1heSAy MDI0IDEzOjM2OjQyICswMjAwOgoKPiBPbiBUaHUsIE1heSAxNiwgMjAyNCBhdCAxMjo0NDowNVBN ICswMjAwLCBNaXF1ZWwgUmF5bmFsIHdyb3RlOgo+ID4gSGkgU2FzY2hhLAo+ID4gCj4gPiBzLmhh dWVyQHBlbmd1dHJvbml4LmRlIHdyb3RlIG9uIFRodSwgMTYgTWF5IDIwMjQgMTI6MjU6NDMgKzAy MDA6Cj4gPiAgIAo+ID4gPiBPbiBUaHUsIE1heSAxNiwgMjAyNCBhdCAxMDozMjoxNEFNICswMjAw LCBNaXF1ZWwgUmF5bmFsIHdyb3RlOiAgCj4gPiA+ID4gSGkgU2FzY2hhLAo+ID4gPiA+ICAgICAK PiA+ID4gPiA+ICtzdGF0aWMgY29uc3Qgc3RydWN0IG5hbmRfb3BfcGFyc2VyIG14Y25kX29wX3Bh cnNlciA9IE5BTkRfT1BfUEFSU0VSKAo+ID4gPiA+ID4gKwlOQU5EX09QX1BBUlNFUl9QQVRURVJO KG14Y25kX2RvX2V4ZWNfb3AsCj4gPiA+ID4gPiArCQkJICAgICAgIE5BTkRfT1BfUEFSU0VSX1BB VF9DTURfRUxFTShmYWxzZSksCj4gPiA+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YXR0ZXJuIG1lYW5zOiBhIHNpbmdsZSBjb21tYW5kIGN5Y2xlCj4gPiBp cyBzdXBwb3J0ZWQsIG5vPyAgCj4gCj4gQSBzaW5nbGUgY29tbWFuZCBjeWNsZSBpbmRlZWQgaXMg YW5kIHNoYWxsIGJlIHN1cHBvcnRlZC4gVGhlCj4gcGwzNXgtbmFuZC1jb250cm9sbGVyLmMgSSBj b3BpZWQgdGhpcyBmcm9tIGhhcwo+IE5BTkRfT1BfUEFSU0VSX1BBVF9DTURfRUxFTSh0cnVlKS4g V2l0aCBhbGwgZWxlbWVudHMgYmVpbmcgb3B0aW9uYWwgdGhpcwo+IGFsc28gYWxsb3dzIGEgc2lu Z2xlIE5BTkRfT1BfUEFSU0VSX1BBVF9EQVRBX0lOX0VMRU0oKQo+IChzdXBwb3J0ZWRfb3AuZGF0 YV9vbmx5X3JlYWQgYmVjb21lcyB0cnVlKS4gSSBjYW4ndCBzdXBwb3J0IHRoYXQsIHNvIEkKPiBt YWRlIHRoZSBDTUQgbWFuZGF0b3J5LgoKQWxyaWdodCwgeWVhaC4gQWNrLgoKVGhhbmtzLApNaXF1 w6hsCgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X18KTGludXggTVREIGRpc2N1c3Npb24gbWFpbGluZyBsaXN0Cmh0dHA6Ly9saXN0cy5pbmZyYWRl YWQub3JnL21haWxtYW4vbGlzdGluZm8vbGludXgtbXRkLwo= From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (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 4979E14D28A for ; Thu, 16 May 2024 13:05:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715864729; cv=none; b=XL7heR5nIuOdMNurF0hkwSfx41ChFcNnWNKcQE/KUxgTR5aKQJvEDu3y5tIx6UwX2K0yQCuWNuOvQwRgpJz0LaU4RRT9sZ91bXI9HSlltGMIyCC2GDUernrA/pG4gHAnKTIH5TwpVi3UTCdMyE8llrbqRfUSXntYpSvIUyMzzRE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715864729; c=relaxed/simple; bh=tRsA9mcjC7X1q3ymft0k8u1T/0bCU39H1P48jPyX7fE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=o8hS2AD5e5G9/COuXijWk7JHLJy3c9K0Zk3LwHPf6PTSuwdJHnMMZbflIb7pcCWsWzbK3KRh2ctTfmBu5+fwtZHBNMRNv3JQ6p8dut0xpocEpnL0vmA0NnTZ/Zp3epGl7AMLR8MGPmdUeVVyny1BCW4taz7tYV5/Ehaxchr0r20= 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=M5r7Jr1r; arc=none smtp.client-ip=217.70.183.199 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="M5r7Jr1r" Received: by mail.gandi.net (Postfix) with ESMTPSA id 779A2FF810; Thu, 16 May 2024 13:05:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715864725; 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=tahKfh/1DJlK3/OTKCEXmpwJffF0zZ1wUE3RarZ3vao=; b=M5r7Jr1r0XfTPsjxh1qWfT090A+s4RSCwaxB6oe8GHVOsCU3RJ/lE5ilPZd4WP/7YY8r17 JhJi19gcZdy8hnovjQUx9DHGb1StGUXJFMqRv2PlomoOlgNxj/91ycHem84JhXwpFm0Uif RS1kBpeJAT4Sy0pB+3rwOjgoZzAe8+nsdOBjktHzso+pabO3pTWP/bmor3TkCWFfyLG2ga Wg05nAdMtk80eVJtcAkS4yPMlmkhRvgPZvWG5MOCbCilVGP9Avm1HN01BHLXIyAtPDmhBw OirXuwMxU9meBbhM5jiBNM51T5fldR7EcLJxuY3m0odJZBdTjNaEr4Oq1tbPcw== Date: Thu, 16 May 2024 15:05:24 +0200 From: Miquel Raynal To: Sascha Hauer Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] mtd: nand: mxc_nand: implement exec_op Message-ID: <20240516150524.24be4aeb@xps-13> In-Reply-To: References: <20240514-mtd-nand-mxc-nand-exec-op-v3-0-3e6f45fd3d82@pengutronix.de> <20240514-mtd-nand-mxc-nand-exec-op-v3-2-3e6f45fd3d82@pengutronix.de> <20240516103214.57a8ce33@xps-13> <20240516124405.2da1aa23@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) 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-GND-Sasl: miquel.raynal@bootlin.com Hi Sascha, s.hauer@pengutronix.de wrote on Thu, 16 May 2024 13:36:42 +0200: > On Thu, May 16, 2024 at 12:44:05PM +0200, Miquel Raynal wrote: > > Hi Sascha, > >=20 > > s.hauer@pengutronix.de wrote on Thu, 16 May 2024 12:25:43 +0200: > > =20 > > > On Thu, May 16, 2024 at 10:32:14AM +0200, Miquel Raynal wrote: =20 > > > > Hi Sascha, > > > > =20 > > > > > +static const struct nand_op_parser mxcnd_op_parser =3D NAND_OP_P= ARSER( > > > > > + NAND_OP_PARSER_PATTERN(mxcnd_do_exec_op, > > > > > + NAND_OP_PARSER_PAT_CMD_ELEM(false), > > > > > + NAND_OP_PARSER_PAT_ADDR_ELEM(true, 7), > > > > > + NAND_OP_PARSER_PAT_CMD_ELEM(true), > > > > > + NAND_OP_PARSER_PAT_WAITRDY_ELEM(true), > > > > > + NAND_OP_PARSER_PAT_DATA_IN_ELEM(true, MAX_DATA_SIZE)),= =20 > > > >=20 > > > > CMD, ADDR, CMD, DATA is the RNDOUT pattern. So it is now working fi= ne? =20 > > >=20 > > > Yes, RNDOUT is working now. =20 > >=20 > > Excellent! > > =20 > > > > Or did you forget to adapt the patterns to your use case? =20 > > >=20 > > > Although it looks like the patterns from the pl35x-nand-controller.c, > > > there is one slight difference. The 'false' in the NAND_OP_PARSER_PAT= _CMD_ELEM > > > above has the effect that a plain NAND_OP_PARSER_PAT_DATA_IN_ELEM is > > > disallowed. =20 > >=20 > > I'm not sure I follow, the above pattern means: a single command cycle > > is supported, no? =20 >=20 > A single command cycle indeed is and shall be supported. The > pl35x-nand-controller.c I copied this from has > NAND_OP_PARSER_PAT_CMD_ELEM(true). With all elements being optional this > also allows a single NAND_OP_PARSER_PAT_DATA_IN_ELEM() > (supported_op.data_only_read becomes true). I can't support that, so I > made the CMD mandatory. Alright, yeah. Ack. Thanks, Miqu=C3=A8l