Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2874317rdh; Wed, 27 Sep 2023 16:00:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFLzFTGvvzAxSK5DTV0Xy8t/C1u/3xP7BKoNTNHDVRQPiBS3MzoBReU6JJ4i338sjb4VoVA X-Received: by 2002:a05:6402:5159:b0:526:e585:e25a with SMTP id n25-20020a056402515900b00526e585e25amr3067705edd.38.1695855612097; Wed, 27 Sep 2023 16:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695855612; cv=none; d=google.com; s=arc-20160816; b=NQSw8k72q4B5tPGeOs5Oxk3xjmSRlQrdUh3pkR+IRcV7p6PZwewa+PKICyFIJv5fLf wyLs9J3lGBQnvdkoFL5Q4YT6KlAgkQ5e/gQGI9SAjS5MIiDXa5ieo3r9H/TKIFlu4vyl KiIR7C/hoRBTE4e503Ek0hTuHeA7rvSgdb7hiRKwNlS07vlZcIxPpQtjejaiQVgu8+hu 82KTr9c+IWcSbsAD3qvA0Yt2499hCW+ZLv9AVhi1Vd0ofybA5e16LiL/vnr3+wiebxia cNM2V3yzOEJx732xQIUon8lRQEuvXIxTzNQj79lLTHvG4YCxQmXC2BkRdnHP/CYxF3r9 UsEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=BYzHJ3e6WJyAtZxmrr4126joB+o93g0JOzJdO55X0do=; fh=/VLcwITZKkx2NCTukt+IPQssBri84Q9sFQs/YLLMRco=; b=z/+tgFhKRHy6SGR95VwPLC91RfNcUWg4C8kwdu9CKyHU99ShYfchU1hoXUBT/JMHb7 D5Eo9Ba4tDky8+EgO3RSZXo/UpAgTbwSMlvUp+6JCyJP37brg4/dlw/HtvAfstlfluZD ShNx4sjxm3CXhusi1aInv8EsNuHKXrko1cCQHFalJ95TGCh15yenSUsltEbRrnTGmGnC VwmvtXpec6IHp9nqeZCxyG1fqKKA6ch+NMkZFopZWUccumcqfvtyajEeGpK9FkF6035h Q1WKZjHCEuweojeiMo0UeOOiZI6j6A6/4x4+etTKB5oDA0jD/i/dWqH8sl4BSIpC9vtv yUHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=pygfUECq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id t15-20020aa7d70f000000b0052fbe72d160si14320088edq.316.2023.09.27.16.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 16:00:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=pygfUECq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 225D280B9098; Wed, 27 Sep 2023 08:30:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232487AbjI0PaB (ORCPT + 99 others); Wed, 27 Sep 2023 11:30:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232184AbjI0PaA (ORCPT ); Wed, 27 Sep 2023 11:30:00 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCFF7180 for ; Wed, 27 Sep 2023 08:29:56 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 41B03FF809; Wed, 27 Sep 2023 15:29:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695828595; 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=BYzHJ3e6WJyAtZxmrr4126joB+o93g0JOzJdO55X0do=; b=pygfUECqVNDPsy+CSPTm3cLY/cdZS+cYhqFCZaUhqXfEVnJkkttvgOP7MWvVyG4FVdSnSa E63g7hMHxSqg0pVGmbECqPDYmtsZxnYKo4+6jlqUTyOMKkY1LFKNNl2E6kG4IucdhUIXw8 PGazdn8trK1EUxPx3WQLILqPhnLcqolccGcW4h0OXGfZAdtNfeLFh6nVYQ2Z95uN5wNjT+ yzeYwURoh88SqR3igmC1F0xqhCc0ynaEyBsnD1nhPvjN/pRH3UhD8iCwVaMeCm68OUHReD TnkF4+Tp/L6TUaiwSxO0oBTwmenjSz1OzFO5CeiZnfmLZw7+/sUwSos1rpozwA== Date: Wed, 27 Sep 2023 17:29:47 +0200 From: Miquel Raynal To: Nikita Shubin Cc: Richard Weinberger , Vignesh Raghavendra , Arnd Bergmann , Linus Walleij , Jean Delvare , Neil Armstrong , Christophe Kerello , Chris Packham , Johan Jonker , Daniel Lezcano , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [RFC PATCH] mtd: nand: add support for ts72xx Message-ID: <20230927172947.33106fe2@xps-13> In-Reply-To: <20230927141532.25525-1-nikita.shubin@maquefel.me> References: <20230927141532.25525-1-nikita.shubin@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 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 27 Sep 2023 08:30:22 -0700 (PDT) Hi Nikita, nikita.shubin@maquefel.me wrote on Wed, 27 Sep 2023 17:15:25 +0300: > Technologic Systems has it's own nand controller implementation in CPLD. >=20 > Signed-off-by: Nikita Shubin > --- > Hello Miqu=C3=A8l. >=20 > Can you please take a look on it as RFC, so no need for the whole series = spinning ? >=20 > I've got rid of all legacy stuff i think, however: I am glad you did, thanks a lot! > - look's like i me ts7250 is missing READCACHE and i couldn't find any do= cs=20 > for this controller, so as legacy had no READCACHE, i mark it as non-su= pported What NAND device do you use? The controller clearly supports it, as it just forwards whatever addrs/cmd/data cycle you input. However we are trying to fix the cache reads support which is unstable. If you use a NAND that is non-JEDEC and non-ONFI then please apply this and you will no longer be bothered by it: https://lore.kernel.org/linux-mtd/20230926132725.5d570e1b@xps-13/T/#md7e5e9= 44a6a08e24f4f1e20068a49f94794ab945 If you are using a Micron chip that specifies not supporting ECC correction together with sequential cache reads, then it's a problem that we will solve soon (you can hardcode chip->controller->supported_op.cont_read to 0); Otherwise we can discuss it. > - legacy wait implementation had no delays - only timeout and if i set=20 > readb_poll_timeout() to something reasonable i experience speed degrada= tion=20 > on mtd_speedtest, can it be left as 0 ? Looks like the legacy implementation used cond_resched(). The delay needs to be observed before first checking for the status, it's a delay that is described in the spec, if you get the status before you might just not see a consistent value. I believe that is worth taking into account in your implementation below (don't wait then delay, it's not relevant). Can you share the values you've tried and the performances you've got? Thanks, Miqu=C3=A8l