From patchwork Tue May 2 09:47:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Couzens X-Patchwork-Id: 98427 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1788955qgf; Tue, 2 May 2017 02:55:38 -0700 (PDT) X-Received: by 10.84.231.16 with SMTP id f16mr39206558plk.58.1493718938234; Tue, 02 May 2017 02:55:38 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id 207si16981851pgc.122.2017.05.02.02.55.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 02:55:38 -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: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:In-Reply-To: References:List-Owner; bh=BhAPRtVN3SRaX0C6D3iB+nWgMjZ/x3C669RoE4nsiSk=; b=UWu ShzZYF6bdGQrbxSlPeIikdTTiKIDcnm419tZKABYEFA9/wxXaABKYgNdYoITB9gMapR+7Xh1ZLTU7 v7N6oY1cZsX/+QcVE6KzifEQobL0HteBb+IM5mQ82gMPGd4Dq6PyydagN52HZ0y8YUVpvvtsf2BRs 4QvLB5zuDqu+8qLSOnmUdpM3QxVtsfGAjfjFcsX/Pq2soNLiBauqcxEgOJm3gfCeWaInTk4okjVDR CHZQxZeIYxChNBBSW5ondd6KakxaMnNAUaSAInuwO8J10mdGuNFsn9SlO9zhQyDbCV/gjwXF9oaS/ HAceBeZgw5GSoq+Moo1sdQX6dc62ugg==; 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 1d5UWk-0005jT-CA; Tue, 02 May 2017 09:55:26 +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 1d5UPe-0000Sj-Ig for linux-mtd@lists.infradead.org; Tue, 02 May 2017 09:48:08 +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 1d5UPG-0003lo-Vs; Tue, 02 May 2017 11:47:43 +0200 From: Alexander Couzens To: linux-mtd@lists.infradead.org Subject: [PATCH] mtd: nand: davinci: set ECC algorithm explicitly for HW based ECC Date: Tue, 2 May 2017 11:47:36 +0200 Message-Id: <20170502094736.9671-1-lynxis@fe80.eu> X-Mailer: git-send-email 2.12.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170502_024806_863201_89D64709 X-CRM114-Status: UNSURE ( 7.01 ) 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 Signed-off-by: Alexander Couzens --- drivers/mtd/nand/davinci_nand.c | 3 +++ 1 file changed, 3 insertions(+) -- 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..f658948ec7e3 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -760,11 +760,14 @@ 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; + 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;