Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3210458imm; Sun, 24 Jun 2018 14:29:57 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLpaAJDr0JBAFDfAu7Nk1dOfGj5BbCUarrclUhrQLtOvVV2t6rPicEbxkyjZFWzwmD6xm3I X-Received: by 2002:a63:8b44:: with SMTP id j65-v6mr1129188pge.248.1529875797523; Sun, 24 Jun 2018 14:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529875797; cv=none; d=google.com; s=arc-20160816; b=h+58ixPps3kmenKAArlQc7s110RgqXB7pqIzEgvRUiMmTvkDV5yfz1ubruja6vYKi8 S9uIpL9U1JtkVZ+SquUeN3JZROqtsTHRfBozXhGL3dyzF6a+o7qMCK+0qUgwfgPCYjld 6nv58p/pKNH/5rTI7OgnPMmWOSRUXzexWZfD0eV4P9nswavs7d0la0FdxOx+MtX/W6ub 4uJcPAWPhrWhCdQjL9Jw1/adUbhb0Yam9bVu3whDtIp39HXK2Eror33Lyq7IHWU2ZR5C ltOBGHInFUrQaUk20EcCu7UoVqSB5gzzSE/p4DuIGlDuVLDrEMbU0gzFBOWH6xvkicQ9 Ey9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Sam56dJzffh/HgwJOXi79xAsu0HRMYX5+/Q/e7SsbuA=; b=Utyv9pEA+hP5sfQ/lBWNPASLgqs0SwRzL5pdcy9qJiiK2uzlW1BDKbgJhMamAI++ee /CfTGAcIi3XNW4zvsHN1Qvj1DokJfdEUio7uchoBk9kpHpd14nv2vxZ+SihuEsT8bZZD Mw091gIhKI+SJCDMV8uo7JGacK8e3I0+IzcNGcV7UVaE1LsLNQXd8Xu/jwtb0ef3ea6z Cht/om3O7M9o4uvq7R7kpBjd0R/urX5zhOibz1jjRXVEe2eMQJ4UJi8vRICfpv9CuZ1J XS8IYvFfLLuX7DmhTLke9WwXws6P3JQclLoqsCKEZw5dLzEc5H5RSPp67BJKuvDQmbWE /Kxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=TckV7yVF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14-v6si13108214pfd.207.2018.06.24.14.29.43; Sun, 24 Jun 2018 14:29:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=TckV7yVF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751977AbeFXV1d (ORCPT + 99 others); Sun, 24 Jun 2018 17:27:33 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:37144 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813AbeFXV1b (ORCPT ); Sun, 24 Jun 2018 17:27:31 -0400 Received: from trochilidae.lan (unknown [IPv6:2a02:169:34d6:10::3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id AA5455C1C06; Sun, 24 Jun 2018 23:27:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1529875649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sam56dJzffh/HgwJOXi79xAsu0HRMYX5+/Q/e7SsbuA=; b=TckV7yVF+vC0vjS+/JPM+KL3391hE0lTUf4PGLRgY7ruUadHMzKpyU6nDaA1fa1u2bGN7r 0P1PjyQv71EATgDnXK4WtAzKy9PGBeOTYW42Q1cQuV7OAHoP5m+WId8gCf4A/KLGd26q4F FN8PlMVNG6BF31/i8xNEUnj9DOQGURQ= From: Stefan Agner To: boris.brezillon@bootlin.com, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, thierry.reding@gmail.com Cc: dev@lynxeye.de, miquel.raynal@bootlin.com, richard@nod.at, marcel@ziswiler.com, krzk@kernel.org, digetx@gmail.com, benjamin.lindqvist@endian.se, jonathanh@nvidia.com, pdeschrijver@nvidia.com, pgaikwad@nvidia.com, mirza.krak@gmail.com, gaireg@gaireg.de, linux-mtd@lists.infradead.org, linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Agner Subject: [PATCH v8 1/6] mtd: rawnand: add Reed-Solomon error correction algorithm Date: Sun, 24 Jun 2018 23:27:22 +0200 Message-Id: <20180624212727.21672-2-stefan@agner.ch> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180624212727.21672-1-stefan@agner.ch> References: <20180624212727.21672-1-stefan@agner.ch> X-Spamd-Result: default: False [-2.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_TWELVE(0.00)[24]; BAYES_HAM(-3.00)[100.00%]; TAGGED_RCPT(0.00)[dt]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MID_CONTAINS_FROM(1.00)[]; ASN(0.00)[asn:13030, ipnet:2a02:169::/32, country:CH]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add Reed-Solomon (RS) to the enumeration of ECC algorithms. Signed-off-by: Stefan Agner Reviewed-by: Boris Brezillon Acked-by: Rob Herring --- Documentation/devicetree/bindings/mtd/nand.txt | 2 +- drivers/mtd/nand/raw/nand_base.c | 1 + include/linux/mtd/rawnand.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mtd/nand.txt b/Documentation/devicetree/bindings/mtd/nand.txt index 8bb11d809429d..eaef8c657aa5c 100644 --- a/Documentation/devicetree/bindings/mtd/nand.txt +++ b/Documentation/devicetree/bindings/mtd/nand.txt @@ -25,7 +25,7 @@ Optional NAND chip properties: Deprecated values: "soft_bch": use "soft" and nand-ecc-algo instead - nand-ecc-algo: string, algorithm of NAND ECC. - Supported values are: "hamming", "bch". + Valid values are: "hamming", "bch", "rs". - nand-bus-width : 8 or 16 bus width if not present 8 - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index 10c4f9919850c..47e9cb9063da4 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -5777,6 +5777,7 @@ static int of_get_nand_ecc_mode(struct device_node *np) static const char * const nand_ecc_algos[] = { [NAND_ECC_HAMMING] = "hamming", [NAND_ECC_BCH] = "bch", + [NAND_ECC_RS] = "rs", }; static int of_get_nand_ecc_algo(struct device_node *np) diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h index 3e8ec3b8a39c7..2d9cb7acbc3d8 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -121,6 +121,7 @@ enum nand_ecc_algo { NAND_ECC_UNKNOWN, NAND_ECC_HAMMING, NAND_ECC_BCH, + NAND_ECC_RS, }; /* -- 2.17.1