From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbbK3IaP (ORCPT ); Mon, 30 Nov 2015 03:30:15 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:33926 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753216AbbK3IaL (ORCPT ); Mon, 30 Nov 2015 03:30:11 -0500 Subject: Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash To: Thomas Petazzoni References: <1448709248-21177-1-git-send-email-sebastian.hesselbarth@gmail.com> <1448709248-21177-5-git-send-email-sebastian.hesselbarth@gmail.com> <20151129153548.304522af@free-electrons.com> Cc: Mark Rutland , Andrew Lunn , Russell King , Jason Cooper , Pawel Moll , Ian Campbell , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Kumar Gala , Gregory Clement , Benoit Masson , linux-arm-kernel@lists.infradead.org, Ezequiel Garcia From: Sebastian Hesselbarth Message-ID: <565C090D.4060006@gmail.com> Date: Mon, 30 Nov 2015 09:30:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <20151129153548.304522af@free-electrons.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29.11.2015 15:35, Thomas Petazzoni wrote: > Adding Ezequiel Garcia in Cc. > > On Sat, 28 Nov 2015 12:14:08 +0100, Sebastian Hesselbarth wrote: >> The NAND device found on Lenovo ix4-300d uses 4-bit BCH ECC protection. >> Add the corresponding properties to the NAND node. > > If the ONFI information from the NAND flash say that it requires 4 bits > per 512, then there should be no need to add this information to the > Device Tree as the pxa3xx_nand driver by default uses the ONFI > information. Thomas, as said in the cover letter, this is also DT cleanup with barebox bootloader in mind. I do not accept what Linux' pxa3xx_nand driver is doing as a reference here ;) > Those properties are only needed when for some reason the vendor has > chosen to use a ECC strength that doesn't match with the one advertised > by the flash in its ONFI information (either stronger or weaker). But > in this case, your commit log is confusing, because it says that the > "NAND device ... uses 4-bit BCH ECC protection". If it really does, > then the patch is not needed :-) I agree that if ONFI is already advertising 4/512 ECC (and it is), we do not need the properties. Anyway, IIRC barebox does not yet properly parse ONFI or at least it does not derive minimum ECC settings from it. I'll have to have a closer look at barebox' ONFI parsing capabilites and can live with this patch not applied even though it does no harm. Sebastian From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Hesselbarth Subject: Re: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash Date: Mon, 30 Nov 2015 09:30:05 +0100 Message-ID: <565C090D.4060006@gmail.com> References: <1448709248-21177-1-git-send-email-sebastian.hesselbarth@gmail.com> <1448709248-21177-5-git-send-email-sebastian.hesselbarth@gmail.com> <20151129153548.304522af@free-electrons.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151129153548.304522af-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thomas Petazzoni Cc: Mark Rutland , Andrew Lunn , Russell King , Jason Cooper , Pawel Moll , Ian Campbell , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Rob Herring , Kumar Gala , Gregory Clement , Benoit Masson , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Ezequiel Garcia List-Id: devicetree@vger.kernel.org On 29.11.2015 15:35, Thomas Petazzoni wrote: > Adding Ezequiel Garcia in Cc. > > On Sat, 28 Nov 2015 12:14:08 +0100, Sebastian Hesselbarth wrote: >> The NAND device found on Lenovo ix4-300d uses 4-bit BCH ECC protection. >> Add the corresponding properties to the NAND node. > > If the ONFI information from the NAND flash say that it requires 4 bits > per 512, then there should be no need to add this information to the > Device Tree as the pxa3xx_nand driver by default uses the ONFI > information. Thomas, as said in the cover letter, this is also DT cleanup with barebox bootloader in mind. I do not accept what Linux' pxa3xx_nand driver is doing as a reference here ;) > Those properties are only needed when for some reason the vendor has > chosen to use a ECC strength that doesn't match with the one advertised > by the flash in its ONFI information (either stronger or weaker). But > in this case, your commit log is confusing, because it says that the > "NAND device ... uses 4-bit BCH ECC protection". If it really does, > then the patch is not needed :-) I agree that if ONFI is already advertising 4/512 ECC (and it is), we do not need the properties. Anyway, IIRC barebox does not yet properly parse ONFI or at least it does not derive minimum ECC settings from it. I'll have to have a closer look at barebox' ONFI parsing capabilites and can live with this patch not applied even though it does no harm. Sebastian -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth) Date: Mon, 30 Nov 2015 09:30:05 +0100 Subject: [PATCH 4/4] ARM: dt: mvebu: ix4-300d: Add ECC properties to NAND flash In-Reply-To: <20151129153548.304522af@free-electrons.com> References: <1448709248-21177-1-git-send-email-sebastian.hesselbarth@gmail.com> <1448709248-21177-5-git-send-email-sebastian.hesselbarth@gmail.com> <20151129153548.304522af@free-electrons.com> Message-ID: <565C090D.4060006@gmail.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 29.11.2015 15:35, Thomas Petazzoni wrote: > Adding Ezequiel Garcia in Cc. > > On Sat, 28 Nov 2015 12:14:08 +0100, Sebastian Hesselbarth wrote: >> The NAND device found on Lenovo ix4-300d uses 4-bit BCH ECC protection. >> Add the corresponding properties to the NAND node. > > If the ONFI information from the NAND flash say that it requires 4 bits > per 512, then there should be no need to add this information to the > Device Tree as the pxa3xx_nand driver by default uses the ONFI > information. Thomas, as said in the cover letter, this is also DT cleanup with barebox bootloader in mind. I do not accept what Linux' pxa3xx_nand driver is doing as a reference here ;) > Those properties are only needed when for some reason the vendor has > chosen to use a ECC strength that doesn't match with the one advertised > by the flash in its ONFI information (either stronger or weaker). But > in this case, your commit log is confusing, because it says that the > "NAND device ... uses 4-bit BCH ECC protection". If it really does, > then the patch is not needed :-) I agree that if ONFI is already advertising 4/512 ECC (and it is), we do not need the properties. Anyway, IIRC barebox does not yet properly parse ONFI or at least it does not derive minimum ECC settings from it. I'll have to have a closer look at barebox' ONFI parsing capabilites and can live with this patch not applied even though it does no harm. Sebastian