Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8023755rwi; Tue, 25 Oct 2022 01:09:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BEJdlydyyqx3YifswWaKoaoWzG22szgOh0h+lNwOmfD4zmlJDCFXecxnWAeiV/BkyCa9v X-Received: by 2002:a17:907:7f1c:b0:78d:ddc7:dfb1 with SMTP id qf28-20020a1709077f1c00b0078dddc7dfb1mr32271939ejc.189.1666685385072; Tue, 25 Oct 2022 01:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666685385; cv=none; d=google.com; s=arc-20160816; b=kyWYkkmCcdz5XHu5LkpWVehnYT1GkBah87VaedMqXk7jxorzbToasu01QKuKoJowgb OrNbHMpnO1BJljeRCv/x0ZCJV7F713RoNsj5s71RHN80jG7m78qhe4aSmM26OEB/1PMu amC04kmjdkjROHVd/PrOnJbrE5RNHgkE3fGlTCKYF9ihQSUh1DOGjYY30JALPbQ67A8v 5xa3nKYT1VtsE/KpwJdn1IcdAhwB222iinU4WDm9ecHkieXuoMT2x1uduLDkd1U1hyKZ Ri6qOTqVyFvON95ECfaqZPl+CBSF7KwHAQOKbz6psJ4vhS2eksU0NnSGk2Xx7aGjHmiY qCwQ== 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=tzRPPOC0dgpsRT+KNgmTDR2mgXFxU07YYnSqsUCT1kg=; b=WwnpkA2gTZCn9/XKXex/kW6qe6TiP4pN0DAAaN8aC7UCfG/YkOi6FNi8L2joX0iwwK 1uv9LFFazdIOb8m0/WJFi/R1kwMdwlokcJInRUXq0+DTBaDMmeEmTVgxjy/Utt/eIcUB 0O9AXmBXZd9cKY3+a/phNtWiarQpydWpgD6Va33DJlmxzMkZhUSrM3BAdw2gK4iYFcYG JIhoCd45pMlUzGnL0FlY6rX1K5zlPvSs82aDdOajLNGnAdlA29MAL2lm8nXzwmjQnRsV fg0uBl9ljXz7+HMX8c4KQaNAVJPm6ZjV+PfJtgOpAQ/LiUszBp8/m5J746WS+DHPfYv0 Damg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aOzwzcbM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp9-20020a1709071b0900b00782539a0286si2342098ejc.142.2022.10.25.01.09.18; Tue, 25 Oct 2022 01:09:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aOzwzcbM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232036AbiJYHsC (ORCPT + 99 others); Tue, 25 Oct 2022 03:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbiJYHr5 (ORCPT ); Tue, 25 Oct 2022 03:47:57 -0400 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21067161FCE for ; Tue, 25 Oct 2022 00:47:53 -0700 (PDT) Received: (Authenticated sender: miquel.raynal@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 5EF0EC0008; Tue, 25 Oct 2022 07:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1666684072; 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=tzRPPOC0dgpsRT+KNgmTDR2mgXFxU07YYnSqsUCT1kg=; b=aOzwzcbMEIl5WPpnU47KzOVf51YQkKfHmSjYRCaFiuZKwrrD1ucjb8/Gn+8vp+ucmH5JeK 5RNC3GVxEJLr0IiNtBvs7CaKEBQxZElV2FuUety3knYmSQfGFon9ve+3P1JuBCeTpmgKth S0uIHomTprmZUtQKtCyt6FM0Ctg9e6iNAtRpdQkP2xrWnhj02fLJqx6zMRPt1ASlTE9HNh kmNlgKIYhhd2RcJ/xJA93fKBFwqCrvrbd4Iu+hXopKGj8RuxC3pJ+utbWJF3A45Z9LuA5j yfcq7e1L19UBAIRpxWeqjaLBSjCMByzuWXcjo05LVdXpKH4qZmL0mdJ0A4lE6w== Date: Tue, 25 Oct 2022 09:47:48 +0200 From: Miquel Raynal To: Vadym Kochan Cc: Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Elad Nachman , Chris Packham , Aviram Dali Subject: Re: [PATCH] mtd: rawnand: marvell: add missing layouts Message-ID: <20221025094748.7dda3a57@xps-13> In-Reply-To: <20221024215531.32033-1-vadym.kochan@plvision.eu> References: <20221024215531.32033-1-vadym.kochan@plvision.eu> 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-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vadym, vadym.kochan@plvision.eu wrote on Tue, 25 Oct 2022 00:55:31 +0300: > From: Aviram Dali >=20 > A missing layouts were added to the driver to support NAND flashes > with ECC layouts of 12 or 16 with page sized of 2048, 4096 or 8192. >=20 > Usually theses are rare layouts, but in Marvell AC5 driver, the ECC > level is set according to the spare area, so we may use these layouts > more frequently. Again, please do not carry cosmetic changes and real new additions in the same patch. >=20 > Signed-off-by: Aviram Dali > Signed-off-by: Vadym Kochan > --- > drivers/mtd/nand/raw/marvell_nand.c | 23 +++++++++++++++-------- > 1 file changed, 15 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/mtd/nand/raw/marvell_nand.c b/drivers/mtd/nand/raw/m= arvell_nand.c > index b9d1e96e3334..7944787f7b9f 100644 > --- a/drivers/mtd/nand/raw/marvell_nand.c > +++ b/drivers/mtd/nand/raw/marvell_nand.c > @@ -283,14 +283,21 @@ struct marvell_hw_ecc_layout { > =20 > /* Layouts explained in AN-379_Marvell_SoC_NFC_ECC */ > static const struct marvell_hw_ecc_layout marvell_nfc_layouts[] =3D { > - MARVELL_LAYOUT( 512, 512, 1, 1, 1, 512, 8, 8, 0, 0, 0), > - MARVELL_LAYOUT( 2048, 512, 1, 1, 1, 2048, 40, 24, 0, 0, 0), > - MARVELL_LAYOUT( 2048, 512, 4, 1, 1, 2048, 32, 30, 0, 0, 0), > - MARVELL_LAYOUT( 2048, 512, 8, 2, 1, 1024, 0, 30,1024,32, 30), > - MARVELL_LAYOUT( 4096, 512, 4, 2, 2, 2048, 32, 30, 0, 0, 0), > - MARVELL_LAYOUT( 4096, 512, 8, 5, 4, 1024, 0, 30, 0, 64, 30), > - MARVELL_LAYOUT( 8192, 512, 4, 4, 4, 2048, 0, 30, 0, 0, 0), > - MARVELL_LAYOUT( 8192, 512, 8, 9, 8, 1024, 0, 30, 0, 160, 30), > + MARVELL_LAYOUT(512, 512, 1, 1, 1, 512, 8, 8, 0, 0, 0), > + MARVELL_LAYOUT(2048, 512, 1, 1, 1, 2048, 40, 24, 0, 0, 0), > + MARVELL_LAYOUT(2048, 512, 4, 1, 1, 2048, 32, 30, 0, 0, 0), > + MARVELL_LAYOUT(2048, 512, 8, 2, 1, 1024, 0, 30, 1024, 32, 30), > + MARVELL_LAYOUT(2048, 512, 8, 2, 1, 1024, 0, 30, 1024, 64, 30), > + MARVELL_LAYOUT(2048, 512, 12, 3, 2, 704, 0, 30, 640, 0, 30), > + MARVELL_LAYOUT(2048, 512, 16, 5, 4, 512, 0, 30, 0, 32, 30), > + MARVELL_LAYOUT(4096, 512, 4, 2, 2, 2048, 32, 30, 0, 0, 0), > + MARVELL_LAYOUT(4096, 512, 8, 5, 4, 1024, 0, 30, 0, 64, 30), > + MARVELL_LAYOUT(4096, 512, 12, 6, 5, 704, 0, 30, 576, 32, 30), > + MARVELL_LAYOUT(4096, 512, 16, 9, 8, 512, 0, 30, 0, 32, 30), > + MARVELL_LAYOUT(8192, 512, 4, 4, 4, 2048, 0, 30, 0, 0, 0), > + MARVELL_LAYOUT(8192, 512, 8, 9, 8, 1024, 0, 30, 0, 160, 30), > + MARVELL_LAYOUT(8192, 512, 12, 12, 11, 704, 0, 30, 448, 64, 30), > + MARVELL_LAYOUT(8192, 512, 16, 17, 16, 512, 0, 30, 0, 32, 30), > }; > =20 > /** Thanks, Miqu=C3=A8l