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=-5.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable 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 25288C433DF for ; Fri, 29 May 2020 09:26:26 +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 E57F12072D for ; Fri, 29 May 2020 09:26:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qxkYFiBW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E57F12072D 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=hDYMYaYgsvoreOoLWZbb+sBhCDI0j1Bz/jHgnLy0eQU=; b=qxkYFiBWAqjQQi cyCxW9cCsKX12wCu9V+/7CRhiSNiGCvoBUiSh8BBZyHaV0HxCB8QBIJa7WgeoO9r5o0OONJmZ8PmA O0WtM48oIrBd7AMKv9FsEe4ZmTYuuQOmeP9IScvakkmNkEGXrJn7TkDYzzaZuVF2AuNxHuub9L8rq rrHIwo7zyUeTKhZMreckBY6U7fTWEbLhxCzfId/DhhOkHOhTe378m1uYPi1Vd4oWlblh8pA1B49u8 ellBe5D4meT3xp6Z52WLT1VuXu7fVTlO3xnCHPEcd9WMwqqPEJA0a8hvERX2hTaO+3lHZK/xL2QeF l1Eh2hfjiaV4zY0uPysQ==; 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 1jebHK-0001mF-Js; Fri, 29 May 2020 09:26:14 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jebGV-00014X-HX; Fri, 29 May 2020 09:25:25 +0000 Received: from xps13 (unknown [91.224.148.103]) (Authenticated sender: miquel.raynal@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id A274C240005; Fri, 29 May 2020 09:25:16 +0000 (UTC) Date: Fri, 29 May 2020 11:25:14 +0200 From: Miquel Raynal To: Boris Brezillon Subject: Re: [PATCH v7 16/20] mtd: nand: Convert generic NAND bits to use the ECC framework Message-ID: <20200529112514.0453904c@xps13> In-Reply-To: <20200529103222.18c5b89b@collabora.com> References: <20200529002517.3546-1-miquel.raynal@bootlin.com> <20200529002517.3546-17-miquel.raynal@bootlin.com> <20200529103222.18c5b89b@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-20200529_022523_752783_65C7E6BF X-CRM114-Status: GOOD ( 12.94 ) 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: Mark Rutland , devicetree@vger.kernel.org, Vignesh Raghavendra , Tudor Ambarus , Julien Su , Richard Weinberger , Weijie Gao , Paul Cercueil , Rob Herring , linux-mtd@lists.infradead.org, Thomas Petazzoni , Mason Yang , Chuanhong Guo , linux-arm-kernel@lists.infradead.org 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 Boris Brezillon wrote on Fri, 29 May 2020 10:32:22 +0200: > On Fri, 29 May 2020 02:25:13 +0200 > Miquel Raynal wrote: > > > Embed a generic NAND ECC high-level object in the nand_device > > structure to carry all the ECC engine configuration/data. Adapt the > > raw NAND and SPI-NAND cores to fit the change. > > In order to split that one, and make future re-organizations less > painful (hope we won't have to do that again, but who knows), I would > recommend doing things in this order: > > 1/ create a nanddev_get_ecc_requirements() helper that returns a > const struct nand_ecc_props * > 2/ patch spinand to use this helper > 3/ introduce nand_ecc > 4/ patch rawnand to use the new ecc layer Sounds like a lot of efforts for a mechanical change to me. Not mentioning that the diff is pretty small now. But ok, I'll try. > > > > Signed-off-by: Miquel Raynal > > --- > > drivers/mtd/nand/raw/atmel/nand-controller.c | 9 +++-- > > drivers/mtd/nand/raw/brcmnand/brcmnand.c | 7 ++-- > > drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 12 +++--- > > drivers/mtd/nand/raw/marvell_nand.c | 7 ++-- > > drivers/mtd/nand/raw/mtk_nand.c | 4 +- > > drivers/mtd/nand/raw/nand_base.c | 25 ++++++------ > > drivers/mtd/nand/raw/nand_esmt.c | 11 +++--- > > drivers/mtd/nand/raw/nand_hynix.c | 41 ++++++++++---------- > > drivers/mtd/nand/raw/nand_jedec.c | 4 +- > > drivers/mtd/nand/raw/nand_micron.c | 14 ++++--- > > drivers/mtd/nand/raw/nand_onfi.c | 8 ++-- > > drivers/mtd/nand/raw/nand_samsung.c | 19 ++++----- > > drivers/mtd/nand/raw/nand_toshiba.c | 11 +++--- > > drivers/mtd/nand/raw/sunxi_nand.c | 5 ++- > > drivers/mtd/nand/raw/tegra_nand.c | 9 +++-- > > drivers/mtd/nand/spi/core.c | 8 ++-- > > drivers/mtd/nand/spi/macronix.c | 6 +-- > > drivers/mtd/nand/spi/toshiba.c | 6 +-- > > include/linux/mtd/nand.h | 8 ++-- > > 19 files changed, 114 insertions(+), 100 deletions(-) > > ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/