Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp567064imm; Wed, 25 Jul 2018 02:09:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcpODud5DJgC4LrDUxPRMGXRB5h3eVpEPLjRN3PM6bQSkpMiCz5WgcyrxSUiY9e18j4NsVX X-Received: by 2002:a65:45cc:: with SMTP id m12-v6mr19649958pgr.160.1532509785414; Wed, 25 Jul 2018 02:09:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532509785; cv=none; d=google.com; s=arc-20160816; b=SJ086jVJxFUaiRFDRQuUpWqGPSKr+TCyoV/9PwzXLiwC5q4A+e1/5m71qTxjI4jwyL OEVvoBfpn3yBLkrNKJquowO5v/mjL4XOKdo+DFVkss1PNBJFdddMPWakcwqxI2ws+X7A 0NLuNg28TaRkfsTuY4uBUvUxIPApUfKXcYQHy57ou04/Xkf/yC5UEJAPtzHbo75dUyOm W+Z8V46k72O4iS3qSLXHo5EzEyuJ01xawK/LuranLUPYKGoReA8eL+9NeqCZQg5X64VJ BIerUDhh3ha2f3FHT/A5mjdPFJ4d5sqr1iyUJ0hlWk49xlRQaXNRZgiM7hDXhiFzAcN1 QTqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=bB9tpBaxbsFUG2vCDXGAnPDY1rrYpILHl2Fc261/Mwc=; b=PGaiqi2DP4kpoT3BDbRfACHbtPScGC+CwChAHfKzS8MYNYZDXAL+6LQMBQGJ0E3Lz8 6d46sNi80N9dmRcnLeDkTWpT8oeM0VHHhcMkj2Hh+SPos8h2kZ42Az41pckczHWb/J4r WTX3IiA9M4j07nMrFDtap6fu5wiMYA14zwyQqIwp4URsO1DQjVwczPBqYWtu28pQhUtX LMXl8OweTVp+pzYawKUeIrXSNqMCdbxtel1/4hrM0RzKBeTDqc0NyAyPt3JGAJ4uoEXW 8SntOwz2PC0IoDAv7xjkw0Z1bZy5J/w1RbWK6nxhFUNaVu307hABpkDERbDNva+mH3py 2ilA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b=OGf2h2tH; 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 s126-v6si14790314pfc.222.2018.07.25.02.09.29; Wed, 25 Jul 2018 02:09:45 -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=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b=OGf2h2tH; 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 S1728646AbeGYKT0 (ORCPT + 99 others); Wed, 25 Jul 2018 06:19:26 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.81]:22704 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728597AbeGYKT0 (ORCPT ); Wed, 25 Jul 2018 06:19:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1532509717; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=bB9tpBaxbsFUG2vCDXGAnPDY1rrYpILHl2Fc261/Mwc=; b=OGf2h2tH2QWPGbOHAAgS9ZykS4+C+f07oHLZ4q3ccPL3cAZGwLsPy6w/QCtj/nY3wd lrCPZJww2JJQ8HECmgHbA5D5UocFarGl9Zym13K9PeKERzszJTn20KakNq8NYqUND28j RmLo9mMj63Q0gOoksc9NaxkdazJ26qFgS+9kdK1nNd5fyfcAarIN35Gbdib8cLapIJX6 m+xfS8dZoV3+oYprNutL24Up4uqjpBI3OJwrpHcjfwh35vuUmcDb5YmF0j3a0H1UoVKE S5LH6BtCkz9bCg5zaBINheJvHOwaKRsamT7ltu8r+y5ZDFOypnc/BlNChw1tPJPU0GnA QqTw== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw87Wiuc1qET/2Lw==" X-RZG-CLASS-ID: mo00 Received: from mbp-13-nikolaus.fritz.box by smtp.strato.de (RZmta 43.13 DYNA|AUTH) with ESMTPSA id 6047f4u6P98ae39 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Wed, 25 Jul 2018 11:08:36 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [PATCH 10/32] ARM: dts: omap3-gta04: update gpmc NAND setup From: "H. Nikolaus Schaller" In-Reply-To: <20180725082810.GA8303@lenoch> Date: Wed, 25 Jul 2018 11:08:38 +0200 Cc: Marek Belisko , =?utf-8?Q?Beno=C3=AEt_Cousson?= , Tony Lindgren , Rob Herring , Mark Rutland , linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20180725081058.GB7467@lenoch> <1E7B727D-1AED-4B00-AD2C-CF9FC562E53D@goldelico.com> <20180725082810.GA8303@lenoch> To: Ladislav Michl X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Am 25.07.2018 um 10:28 schrieb Ladislav Michl : >=20 > On Wed, Jul 25, 2018 at 10:16:28AM +0200, H. Nikolaus Schaller wrote: >> Hi, >>=20 >>> Am 25.07.2018 um 10:10 schrieb Ladislav Michl = : >>>=20 >>> On Wed, Jul 25, 2018 at 08:58:42AM +0200, H. Nikolaus Schaller = wrote: >>>> to better match omap3-beagle.dts (which was the basis >>>> of designing the GTA04). >>>>=20 >>>> Signed-off-by: H. Nikolaus Schaller >>>> --- >>>> arch/arm/boot/dts/omap3-gta04.dtsi | 14 +++++++------- >>>> 1 file changed, 7 insertions(+), 7 deletions(-) >>>>=20 >>>> diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi = b/arch/arm/boot/dts/omap3-gta04.dtsi >>>> index 03fe404cbf56..9568e0c4d4bf 100644 >>>> --- a/arch/arm/boot/dts/omap3-gta04.dtsi >>>> +++ b/arch/arm/boot/dts/omap3-gta04.dtsi >>>> @@ -616,27 +616,27 @@ >>>> interrupt-parent =3D <&gpmc>; >>>> interrupts =3D <0 IRQ_TYPE_NONE>, /* fifoevent */ >>>> <1 IRQ_TYPE_NONE>; /* termcount */ >>>> + ti,nand-ecc-opt =3D "ham1"; >>>> + rb-gpios =3D <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 = */ >>>> nand-bus-width =3D <16>; >>>> - ti,nand-ecc-opt =3D "bch8"; >>>=20 >>> You are using weeker ECC scheme just to be compatible with another = machine? >>=20 >> No not another machine. The GTA04 uses the same SoC and NAND chip as = the BeagleBoard, >> so you can imagine GTA04 being a BeagleBoard + a lot of other things. >>=20 >> The key reason is to change the ecc scheme is to be compatible with = the U-Boot used. >>=20 >> BootROM can only handle ham1 for the MLO. And there is no = nand-ecc-opt >> for each partition. So we either can't mix ECC schemes if we want to = be able >> to read/write MLO as the first partition from kernel. >>=20 >>> So now you cannot boot already deployed filesystem... >>=20 >> No. We always used ham1 and bch8 wasn't working at all here. = Therefore nobody >> did use upstream kernel for NAND yet... >>=20 >>> Also is it enough for >>> NAND chip used? >>=20 >> Well, the chip is recommended to use bch8 but BootROM imposes above = mentioned limits. >=20 > Then common way to handle such a situation is to use 1bit hamming for = MLO and BCH8 for > the rest. You will end with corrupted filesystem with ham1 which I'd = consider very > unfortunate. >=20 > (I know there were endless discussions how to handle this situation. = It is already > solved in U-Boot and for updating MLO from Linux I'm using writeloader = tool) Never heard of this tool, but we haven't followed this discussion for = years since we never had problems with "ham1-everywhere". What I am not completely = sure is if ubifs is using its own ECC scheme or not. If it is (like I assume), the = user-space partition is independent of this setting and we just have discussion for = MLO/U-Boot and kernel partitions. So I think it boils down to the question if a) upstream should do a suboptimal thing, but be compatible to the = current vendor kernel and u-boot b) upstream should do the right thing, but stay incompatible Result of b) would e.g. a stock Debian kernel will not be able to read = or write the partitions of a device created with vendor kernel. And even worse, it is not clear if users will want to erase and reflash = the NAND to match what kernel.org defines if they have a running system. This makes me believe that a) is still better for practical reasons, = even if technically worse. BR, Nikolaus >=20 > ladis >=20 >> BR, >> Nikolaus >>=20 >>>=20 >>> ladis >>>=20 >>>> + #address-cells =3D <1>; >>>> + #size-cells =3D <1>; >>>>=20 >>>> - gpmc,sync-clk-ps =3D <0>; >>>> + gpmc,device-width =3D <2>; >>>> gpmc,cs-on-ns =3D <0>; >>>> gpmc,cs-rd-off-ns =3D <44>; >>>> gpmc,cs-wr-off-ns =3D <44>; >>>> gpmc,adv-on-ns =3D <6>; >>>> gpmc,adv-rd-off-ns =3D <34>; >>>> gpmc,adv-wr-off-ns =3D <44>; >>>> - gpmc,we-off-ns =3D <40>; >>>> gpmc,oe-off-ns =3D <54>; >>>> + gpmc,we-off-ns =3D <40>; >>>> gpmc,access-ns =3D <64>; >>>> gpmc,rd-cycle-ns =3D <82>; >>>> gpmc,wr-cycle-ns =3D <82>; >>>> gpmc,wr-access-ns =3D <40>; >>>> gpmc,wr-data-mux-bus-ns =3D <0>; >>>> - gpmc,device-width =3D <2>; >>>> - >>>> - #address-cells =3D <1>; >>>> - #size-cells =3D <1>; >>>> + gpmc,sync-clk-ps =3D <0>; >>>>=20 >>>> x-loader@0 { >>>> label =3D "X-Loader"; >>>> --=20 >>>> 2.12.2 >>>>=20 >>>> -- >>>> To unsubscribe from this list: send the line "unsubscribe = linux-omap" in >>>> the body of a message to majordomo@vger.kernel.org >>>> More majordomo info at http://vger.kernel.org/majordomo-info.html