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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11E86C28CBC for ; Sun, 3 May 2020 19:06:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id AE0A7206EB for ; Sun, 3 May 2020 19:06:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BS6sBw9A" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE0A7206EB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject: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=jihNXH9NedjrK9LL+yAy2e4/WSad6quunXdWbyQYagc=; b=BS6sBw9ARb5ZTA l2+DPfRniH7MfKh1Bc1buGcwkgwJpIqwlUqdYwoMgcWsLObufRULUp4pJ2KoXsF2Ae+k01cWzUE1u 8Z8zSkgB2m1/su4HGJsVnWlkCBU39719V0Df1kY9PuseiY+VuujZAwYL3gZfFSQK/o/w/yt2JMjFk dAvmvRLrPrG0lAmliNnSXV9uHU5YFxWhDG+wh7TIT67xDvXyoII42OxBVC6sf55CN6Ymutm7xK7Oy u6iDo8HJai6TRwocnoiKWw6rmU1N2CkNM/50QNxUitRoojVq2MC4p000P8xt1ObPYtqm29J1H3lMf QdGMoZEeyQfuFfT7Amgw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVJwp-0003YA-K7; Sun, 03 May 2020 19:06:43 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVJwm-0003XE-76 for linux-mtd@lists.infradead.org; Sun, 03 May 2020 19:06:41 +0000 X-Originating-IP: 91.224.148.103 Received: from xps13 (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id B7711C0007; Sun, 3 May 2020 19:06:25 +0000 (UTC) Date: Sun, 3 May 2020 21:06:23 +0200 From: Miquel Raynal To: Boris Brezillon Subject: Re: [PATCH v2 08/11] mtd: rawnand: jedec: Adapt the parameter page read to constraint controllers Message-ID: <20200503210623.25d384c4@xps13> In-Reply-To: <20200429180405.5bf69447@collabora.com> References: <20200429155540.22048-1-miquel.raynal@bootlin.com> <20200429155540.22048-9-miquel.raynal@bootlin.com> <20200429180405.5bf69447@collabora.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200503_120640_393787_9E63CF73 X-CRM114-Status: GOOD ( 20.65 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Simek , Vignesh Raghavendra , Tudor Ambarus , Richard Weinberger , linux-mtd@lists.infradead.org, Thomas Petazzoni , Naga Sureshkumar Relli Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org Hi Boris, Boris Brezillon wrote on Wed, 29 Apr 2020 18:04:05 +0200: > On Wed, 29 Apr 2020 17:55:37 +0200 > Miquel Raynal wrote: > > > We already know that there are controllers not able to read the three > > copies of the parameter page in one go. The workaround was to first > > request the controller to assert command and address cycles on the > > NAND bus to trigger a parameter page read, and then do a read > > operation for each page. > > > > But there are also controllers which are not able to split the > > parameter page read between the command/address cycles and the actual > > data operation. > > > > All controllers are expected to be able to change the read column > > though. So let's use a regular parameter page read operation for the > > first iteration and use a change read column operation for the > > following copies. > > > > The extra command and address cycles sent over the NAND bus are > > negligible compared to the amount of data that is being transferred > > anyway. > > > > Signed-off-by: Miquel Raynal > > --- > > drivers/mtd/nand/raw/nand_jedec.c | 28 +++++++++++++++------------- > > 1 file changed, 15 insertions(+), 13 deletions(-) > > > > diff --git a/drivers/mtd/nand/raw/nand_jedec.c b/drivers/mtd/nand/raw/nand_jedec.c > > index 15937e02c64f..b2be9056759a 100644 > > --- a/drivers/mtd/nand/raw/nand_jedec.c > > +++ b/drivers/mtd/nand/raw/nand_jedec.c > > @@ -25,7 +25,7 @@ int nand_jedec_detect(struct nand_chip *chip) > > { > > struct mtd_info *mtd = nand_to_mtd(chip); > > struct nand_memory_organization *memorg; > > - struct nand_jedec_params *p; > > + struct nand_jedec_params *p = NULL, *pbuf; > > Looks like you've merged 2 different commits here. I remember you had a > separate commit adding pbuf to avoid an extra memcpy(). Actually this was only fixed in the onfi detection routine. The jedec equivalent does not copy the page (the copy came from the 3-way merge that has only been added to onfi detection). Here pbuf represents the buffer containing the three pages while p now only points to the actual page that is correct. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/