Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1092202imm; Thu, 31 May 2018 15:17:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJCp8XbOYqAa4HZf0+kxmGi+NMPg/MmE6mRXGnF04Rx0TYAQZ3aycQ8Sur1mtPKO1Z3yXLD X-Received: by 2002:a17:902:b189:: with SMTP id s9-v6mr8685373plr.352.1527805061590; Thu, 31 May 2018 15:17:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527805061; cv=none; d=google.com; s=arc-20160816; b=wme2oHQRDxOu1IXSJLuaRI9TKX33LjoUY6O+W5Hnv5yEV4XDOgtJqz5T1lf8SH4VSJ PzoDJTkenGG8AEj8Q0J1tbo0QaP4yBmo6kDeuEx7rIXaV9Icebs70KmyNYVYWitqijcH X8Yugt5W9/uGbYriagz/OplIzmYVwoFvjzqp2iZYqclPpz+DIswAkkkR+JDc3X3EwnGJ 3BmswOApbYYb1b9bwA0EN3J/MCMJNc24xt5YIvH52sQsRAqK6KQYVfAykScdZ0Vef+Hg gwapwUjMnlHxwOFfVPTynMwVzsv9eLRnN3RZ8Mv7qk6DSj9wViSuNytLW5gI2Oyp/GAb V8fA== 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=+EW1XFsV93btb5f8ik9wXLajQcskpWLBoCvySemO3ts=; b=FFZZ5jhPvlRanP+66DJY/yU7+mhx0CD8dZDqzXqxkK11gXKCxajjP6fCnlj8hKKJIM tiKUvdZak1/vVCY0GREoQP55O+R8ZT/xIWx4uMpKQ0or5JT76cmJYjtDEOS8KSIf0Ber 7zDsIfxfWtSpqtY1Ycf16dCp0EFvyiDlciJWPh0xwdY+tjjtgNwffnkMUSzqvMk6dz4k u+CCLBPrsZGYfJTBjxm1KMuQDvIEemgGeYn3fXNrfOyyMecMHo1IjenWlH3I4F8OLE/N XHUSrqWPlTXkd5j3Uy0F3b3FO/ySVcnwc7IkIrf0J2Z+OLosHFaYZKbF/ZgOl3dcJd1N 8QSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=otCTLNZJ; 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 o65-v6si23466486pfb.188.2018.05.31.15.17.27; Thu, 31 May 2018 15:17:41 -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=otCTLNZJ; 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 S1751068AbeEaWQq (ORCPT + 99 others); Thu, 31 May 2018 18:16:46 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:37478 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbeEaWQk (ORCPT ); Thu, 31 May 2018 18:16:40 -0400 Received: from trochilidae.toradex.int (unknown [37.17.239.3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id A92A75C1EEA; Fri, 1 Jun 2018 00:16:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1527804999; 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=+EW1XFsV93btb5f8ik9wXLajQcskpWLBoCvySemO3ts=; b=otCTLNZJY2NmP0ThixThAnoxxdyrYFECOj79ysQaFNk4I1wjGnLTdQgkIVLGw6aDL0L5Xz utpgd7EvrUFpjJ51asY6ubtPgjiRpRHPcf6/QqpLsS9oeFqeHjY7aPk+TKR2osrnluQjON vuLQ+hwGVe82Ecsipl5EI8UaZVUh0u8= 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, stefan@agner.ch, linux-mtd@lists.infradead.org, linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/6] mtd: rawnand: add Reed-Solomon error correction algorithm Date: Fri, 1 Jun 2018 00:16:32 +0200 Message-Id: <20180531221637.6017-2-stefan@agner.ch> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180531221637.6017-1-stefan@agner.ch> References: <20180531221637.6017-1-stefan@agner.ch> X-Spamd-Result: default: False [-2.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_TWELVE(0.00)[23]; BAYES_HAM(-3.00)[100.00%]; RCVD_TLS_ALL(0.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)[]; RCVD_COUNT_ZERO(0.00)[0]; MID_CONTAINS_FROM(1.00)[]; ASN(0.00)[asn:13030, ipnet:37.17.238.0/23, country:CH]; TO_DN_NONE(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 --- drivers/mtd/nand/raw/nand_base.c | 1 + include/linux/mtd/rawnand.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c index f28c3a555861..9eb5678dd6d0 100644 --- a/drivers/mtd/nand/raw/nand_base.c +++ b/drivers/mtd/nand/raw/nand_base.c @@ -5744,6 +5744,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 5dad59b31244..6a82da8c44ce 100644 --- a/include/linux/mtd/rawnand.h +++ b/include/linux/mtd/rawnand.h @@ -114,6 +114,7 @@ enum nand_ecc_algo { NAND_ECC_UNKNOWN, NAND_ECC_HAMMING, NAND_ECC_BCH, + NAND_ECC_RS, }; /* -- 2.17.0