From patchwork Tue May 2 08:13:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Couzens X-Patchwork-Id: 98415 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1759589qgf; Tue, 2 May 2017 01:14:18 -0700 (PDT) X-Received: by 10.98.201.72 with SMTP id k69mr30223379pfg.74.1493712858342; Tue, 02 May 2017 01:14:18 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id e70si3982099pfd.278.2017.05.02.01.14.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 01:14:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mQg3pao7ck6DFq9R1GW1h6itO1yuGiJqEb3/hGPnxGU=; b=k/wZCDLjVfgubATBtfBhdFAQn0 TmtGsDCBopj+2nCtx45vk04+8yK+WHKf8mTwYiYGH1OSIziA/EFY32iv7Wl33/9iucq7cxrvvirWy u1IJFdhzvjtyx1iVUQ/mSKzdWIgTQrLvb9lx95t/qCjZLx0qhZwjYS2E/NbztvP9YBYAqvG23HEBk BSPY8xAsWO8pSouQUBG0OrYTB6lPjhbTURG5lXmRzh2yov952XpR41DKa5/rUvfSZfs/V9227J3F+ WEwfDSrZQQE0Y2hzsp1DC7CAsklUi2rGMyhmK/stuDZZURAtr6+lhzvpLVSbC0gLqxTnw2jYaqXm4 ddCIzsEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d5Swo-0005b1-6o; Tue, 02 May 2017 08:14:14 +0000 Received: from mail.base45.de ([2001:67c:2050:310::a:2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d5Swc-0005LA-4S for linux-mtd@lists.infradead.org; Tue, 02 May 2017 08:14:04 +0000 Received: from ip5b4049fd.dynamic.kabel-deutschland.de ([91.64.73.253] helo=lazus.yip) by mail.base45.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1d5SwE-0002Yz-Gk; Tue, 02 May 2017 10:13:38 +0200 From: Alexander Couzens To: linux-mtd@lists.infradead.org Subject: [PATCH 3/3][v3] mtd: nand: davinci: set ECC algorithm explicitly for HW based ECC Date: Tue, 2 May 2017 10:13:23 +0200 Message-Id: <20170502081323.3138-4-lynxis@fe80.eu> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170502081323.3138-1-lynxis@fe80.eu> References: <20170313074641.28b383e7@bbrezillon> <20170502081323.3138-1-lynxis@fe80.eu> In-Reply-To: <20170313074641.28b383e7@bbrezillon> References: <20170313074641.28b383e7@bbrezillon> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170502_011402_355242_BFFD1EF6 X-CRM114-Status: UNSURE ( 8.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Alexander Couzens , Richard Weinberger MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Required to set the ooblayout based on the algorithm. Signed-off-by: Alexander Couzens --- drivers/mtd/nand/davinci_nand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.12.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 27fa8b87cd5f..9e5167496ce1 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -760,11 +760,13 @@ static int nand_davinci_probe(struct platform_device *pdev) info->chip.ecc.hwctl = nand_davinci_hwctl_4bit; info->chip.ecc.bytes = 10; info->chip.ecc.options = NAND_ECC_GENERIC_ERASED_CHECK; - } else { + info->chip.ecc.algo = NAND_ECC_BCH; + } else { /* 1bit ecc hamming */ info->chip.ecc.calculate = nand_davinci_calculate_1bit; info->chip.ecc.correct = nand_davinci_correct_1bit; info->chip.ecc.hwctl = nand_davinci_hwctl_1bit; info->chip.ecc.bytes = 3; + info->chip.ecc.algo = NAND_ECC_HAMMING; } info->chip.ecc.size = 512; info->chip.ecc.strength = pdata->ecc_bits;