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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B19B8C4167B for ; Fri, 8 Dec 2023 11:33:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573588AbjLHLdo (ORCPT ); Fri, 8 Dec 2023 06:33:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233385AbjLHLdk (ORCPT ); Fri, 8 Dec 2023 06:33:40 -0500 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BC8410F7 for ; Fri, 8 Dec 2023 03:33:45 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9533FC0009; Fri, 8 Dec 2023 11:33:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702035224; 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=q7mhzothrEhd15CNNG5xWOdsPWcFPpUWUvzvae2RXHo=; b=DD66eG0RceDT1wVmrEB6tmb408s5YHB+uJffUXZ1AwNUynvv+nUSQSa2HUUlonthRtDGQW wUWU47XnZQc2bzbpuevIu3PagzpR2u+rK9QJy8G3ZXz6i/9MsbQ26vanqF03DDiKm6wYv4 ZlFAlgGxVBWNNDKySXFcrs57n3EibPZxTlm8/5tu4dyx36lJREiXHnouogKxQl+8xYh8yv vT5yBr6NRhhdXzws+gq/1g677HV3gA6KZM4LOA7esKXTly3OR9X3Mmqj3aTURe8cBDC9Bx xuaHs8JdiSxTx5Zj4IWL4NSdwgg3QZ4wYR7HiU+QZoWDoxKsxbzOOvrBqajd5w== Date: Fri, 8 Dec 2023 12:33:38 +0100 From: Miquel Raynal To: Nikita Shubin Cc: Andy Shevchenko , Richard Weinberger , Vignesh Raghavendra , Arnd Bergmann , Linus Walleij , Neil Armstrong , Daniel Golle , Jean Delvare , Christophe Kerello , Chris Packham , Johan Jonker , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Alexander Sverdlin Subject: Re: [PATCH v5 19/39] mtd: rawnand: add support for ts72xx Message-ID: <20231208123338.37f1a141@xps-13> In-Reply-To: <6bc0cf7ea58fae2e6a3765f673a777788d465984.camel@maquefel.me> References: <20231122-ep93xx-v5-0-d59a76d5df29@maquefel.me> <20231122-ep93xx-v5-19-d59a76d5df29@maquefel.me> <6bc0cf7ea58fae2e6a3765f673a777788d465984.camel@maquefel.me> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nikita, > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0for (i =3D 0; i < instr->ctx.addr.naddrs; i++) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0iow= rite8(instr->ctx.addr.addrs[i], data- =20 > > > >base); =20 > >=20 > > iowrite8_rep() ? > > =20 > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0case NAND_OP_DATA_IN_INSTR: > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0ioread8_rep(data->base, instr->ctx.data.buf.in, > > > instr->ctx.data.len); =20 > >=20 > > Hehe, you are even using it... > >=20 > > ... > > =20 > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (instr->delay_ns) =20 > >=20 > > What will happen if you drop this check? > > =20 > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0ndelay(instr->delay_ns); =20 >=20 > No idea! I was asked to keep it by Miquel: Your controller is very simple and just queues whatever command you ask, precisely when you ask it to do so. But the NAND bus is a bit more complex and there are minimum delays between certain instructions. This delay is meant to respect that. Sometimes it will be 0, and sometimes not. It depends what NAND op you do. You can check the value of these delays in the core. Thanks, Miqu=C3=A8l