Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380209 > unrolled thread

[PATCH 02/12] mtd: nand: davinci: set ECC algorithm explicitly

Started byRafał Miłecki <zajec5@gmail.com>
First post2016-04-15 22:00 +0200
Last post2016-04-15 22:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 02/12] mtd: nand: davinci: set ECC algorithm explicitly Rafał Miłecki <zajec5@gmail.com> - 2016-04-15 22:00 +0200

#1380209 — [PATCH 02/12] mtd: nand: davinci: set ECC algorithm explicitly

FromRafał Miłecki <zajec5@gmail.com>
Date2016-04-15 22:00 +0200
Subject[PATCH 02/12] mtd: nand: davinci: set ECC algorithm explicitly
Message-ID<roi4i-8kL-21@gated-at.bofh.it>
This is part of process deprecating NAND_ECC_SOFT_BCH (and switching to
enum nand_ecc_algo).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 drivers/mtd/nand/davinci_nand.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index fe3fd29..b0a2801 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -738,6 +738,14 @@ static int nand_davinci_probe(struct platform_device *pdev)
 	}
 	info->chip.ecc.mode = ecc_mode;
 
+	/*
+	 * When using software ECC this driver support hamming only. Force
+	 * ecc.algo to NAND_ECC_HAMMING to avoid adding an extra ->ecc_algo
+	 * field to davinci_nand_pdata.
+	 */
+	if (ecc_mode == NAND_ECC_SOFT)
+		info->chip.ecc.algo = NAND_ECC_HAMMING;
+
 	info->clk = devm_clk_get(&pdev->dev, "aemif");
 	if (IS_ERR(info->clk)) {
 		ret = PTR_ERR(info->clk);
-- 
1.8.4.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web