From patchwork Mon Jul 17 05:33:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arseniy Krasnov X-Patchwork-Id: 13316380 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org From: Arseniy Krasnov Subject: [PATCH v4 0/2] support 512B ECC step size for Meson NAND Date: Mon, 17 Jul 2023 08:33:59 +0300 Message-ID: <20230717053402.1203724-1-AVKrasnov@sberdevices.ru> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Liang Yang , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl Cc: oxffffaa@gmail.com, kernel@sberdevices.ru, Arseniy Krasnov , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Hello, this patchset adds support for 512B ECC step size for Meson NAND. Current implementation only supports 1024B. There are three patches: 1) Update for device tree bindings to replace 'const' type of field 'nand-ecc-step-size' with 'enum' which contains 512 and 1024. ^^^ this is already merged to nand-next in v3 and removed from v4 2) Update for device tree bindings to add dependency between properties 'nand-ecc-strength' and 'nand-ecc-step-size'. 3) Update for Meson driver - new enum value for 512B ECC and reworked ECC capabilities structure to support both 512B and 1024B ECC. By default this driver uses 1024B ECC, 512B could be enabled in device tree. Changelog: v1 -> v2: * Add default value of 1024 to the bindings patch (0001). * Remove "Acked-by: Rob Herring " from the bindings patch (0001) due to added default value. * Remove invalid calculation of OOB bytes, available for ECC engine from patch 0002. This logic is incorrect from the origins, so I don't touch it in this patchset. It will be fixed by another patch, as in fact, it doesn't affect this patchset. v2 -> v3: * Add new patch which adds dependency between 'nand-ecc-strength' and 'nand-ecc-step-size' (0002). * Return "Acked-by: Rob Herring " to 0001. * Remove "default" value from 0001, due to dependency patch. * Remove example value from 0001, due to dependency patch. v3 -> v4: * 0001 is removed from patchset because it was merged to nand-next. * 0002 is rebased on the latest nand-next. * RFC tag is removed. Links: v1: https://lore.kernel.org/linux-mtd/20230628092937.538683-1-AVKrasnov@sberdevices.ru/ v2: https://lore.kernel.org/linux-mtd/20230705065434.297040-1-AVKrasnov@sberdevices.ru/ v3: https://lore.kernel.org/linux-mtd/20230711122129.2635558-1-AVKrasnov@sberdevices.ru/ Arseniy Krasnov (2): dt-bindings: nand: meson: make ECC properties dependent mtd: rawnand: meson: support for 512B ECC step size .../bindings/mtd/amlogic,meson-nand.yaml | 4 ++ drivers/mtd/nand/raw/meson_nand.c | 45 ++++++++++++++----- 2 files changed, 38 insertions(+), 11 deletions(-)