From patchwork Sat Sep 6 20:49:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Ebalard X-Patchwork-Id: 4858121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C25D7C0338 for ; Sat, 6 Sep 2014 20:50:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E97D720138 for ; Sat, 6 Sep 2014 20:50:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24FDF20131 for ; Sat, 6 Sep 2014 20:50:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XQMtx-000193-1O; Sat, 06 Sep 2014 20:48:05 +0000 Received: from 36.223.133.77.rev.sfr.net ([77.133.223.36] helo=smtp.natisbad.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XQMtu-00015T-Si; Sat, 06 Sep 2014 20:48:03 +0000 Received: by smtp.natisbad.org (Postfix, from userid 109) id D33091701280; Sat, 6 Sep 2014 22:47:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1410036459; bh=Jic73Sp7vKIey1CMn3lnEJiQyI9L6vkb/9Wd5GhHyvg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=f2yluuA5OdBGT83S1tauT76bIgcrMXF+RC3KzeRCDvxW5aKKzwu//hnkGYZ9ia4En W/m9gvWxMk+37x6nwNFZYVu5DMsIsE2ISpoFSOzPUiPOvIaSUD+PDkkLG92iQxsamO 5skZ9RBEobokKWt2l2+6WMhQWzKEdl0Sb5ykqk3g= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from small (localhost [IPv6:::1]) by smtp.natisbad.org (Postfix) with ESMTP id CC55717001E2; Sat, 6 Sep 2014 22:47:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=natisbad.org; s=mail; t=1410036457; bh=Jic73Sp7vKIey1CMn3lnEJiQyI9L6vkb/9Wd5GhHyvg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=oc/Uh4dFiHPVYzypC0Df3Y0qWAGoPUBQfPuk23LukjtUSfHgEl/p67cQeqibfAE2D ++i2TsNVbaoJqarpXs2AYhm5l/iIoHpgnM9z5fJYPsdtp+pg4qlnQpRvOcc9jdVIOl v7/0aQkevXMgG4W2J0AzYsw7cYof6x2VAO48S6B0= X-Hashcash: 1:20:140906:ezequiel.garcia@free-electrons.com::OAK2AkZO3NYr5OyX:0000000000000000000000000001Jpq X-Hashcash: 1:20:140906:computersforpeace@gmail.com::FzMi45rrA5YJWZJP:00000000000000000000000000000000007cDc X-Hashcash: 1:20:140906:linux@arm.linux.org.uk::C0MH6Tdpm3P397qF:0000000000000000000000000000000000000000NaH X-Hashcash: 1:20:140906:jason@lakedaemon.net::ihKhGacxTVZwExR3:000000000000000000000000000000000000000006OP6 X-Hashcash: 1:20:140906:klightspeed@killerwolves.net::RuSoHSh5U342VlhD:0000000000000000000000000000000003Hw6 X-Hashcash: 1:20:140906:linux-arm-kernel@lists.infradead.org::5mPTiWdTL+XyM0Ek:00000000000000000000000000Eka X-Hashcash: 1:20:140906:linux-mtd@lists.infradead.org::TJFq1b+bxdDJLOof:000000000000000000000000000000001voV X-Hashcash: 1:20:140906:thomas.petazzoni@free-electrons.com::g2Ih/G3iaojjlFLA:000000000000000000000000001wLR X-Hashcash: 1:20:140906:gregory.clement@free-electrons.com::IuQIWR9GOJShHlFV:0000000000000000000000000000Fqj X-Hashcash: 1:20:140906:devicetree@vger.kernel.org::IlBnwNAyhga0+lcx:000000000000000000000000000000000008Onb From: Arnaud Ebalard To: Ezequiel Garcia , Brian Norris , Russell King , Jason Cooper Subject: [PATCH 1/2] ARM: mvebu: Netgear RN104: Use Hardware BCH ECC In-Reply-To: References: Message-Id: <920c7e7169dc6aaaa3eb4bced2336d38e77b8864.1410035142.git.arno@natisbad.org> Date: Sat, 06 Sep 2014 22:49:25 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140906_134803_229515_F2CF2D70 X-CRM114-Status: GOOD ( 11.31 ) X-Spam-Score: 1.5 (+) Cc: Thomas Petazzoni , devicetree@vger.kernel.org, Ben Peddell , linux-mtd@lists.infradead.org, Gregory Clement , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The bootloader on the Netgear ReadyNAS RN104 uses Hardware BCH ECC (strength = 4), while the pxa3xx NAND driver by default uses Hamming ECC (strength = 1). This patch changes the ECC mode on these machines to match that of the bootloader and of the stock firmware. That way, it is now possible to update the kernel from userland (e.g. using standard tools from mtd-utils package); u-boot will happily load and boot it. The issue was initially reported and fixed by Ben Pedell for RN102. The RN104 shares the same Hynix H27U1G8F2BTR NAND flash and setup. This patch is based on Ben's fix for RN102. Fixes: 0373a558bd79 ("ARM: mvebu: Enable NAND controller in ReadyNAS 104 .dts file") Depends-on: 5b3e507820c6 ("mtd: nand: pxa3xx: Use ECC strength and step size devicetree binding") Signed-off-by: Arnaud Ebalard --- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/armada-370-netgear-rn104.dts b/arch/arm/boot/dts/armada-370-netgear-rn104.dts index f7eb110f43d4..d49e8f24a1c9 100644 --- a/arch/arm/boot/dts/armada-370-netgear-rn104.dts +++ b/arch/arm/boot/dts/armada-370-netgear-rn104.dts @@ -165,6 +165,10 @@ marvell,nand-enable-arbiter; nand-on-flash-bbt; + /* Use Hardware BCH ECC */ + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; + partition@0 { label = "u-boot"; reg = <0x0000000 0x180000>; /* 1.5MB */