From: Feng Kan <fkan@amcc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] ppc4xx: add support for alternate format for ndfc
Date: Thu, 18 Feb 2010 16:08:49 -0800 [thread overview]
Message-ID: <4B7DD691.8070805@amcc.com> (raw)
In-Reply-To: <20100218231307.914CBE75F36@gemini.denx.de>
Dear Wolfgang:
The problem goes back a bit. The ordering you see in the ndfc file has been changed a
few times, back and forth and cause quite a bit of problem. The define we speak of is
in the driver/mtd/nand/nand_ecc.c file. The nand_correct_data function uses two ways
of check ECC correctness. However the ndfc calculate only supports one ordering, although
both placement method in the patch would work. It also serves to nail down the ordering
depending on the define is used or not.
There is also the following in the code, should you agree, this will also need to be removed
as well.
/* The PPC4xx NDFC uses Smart Media (SMC) bytes order */
#ifdef CONFIG_NAND_NDFC
#define CONFIG_MTD_NAND_ECC_SMC
#endif
Feng Kan
On 02/18/2010 03:13 PM, Wolfgang Denk wrote:
> Dear fkan at amcc.com,
>
> In message<1266531913-20756-1-git-send-email-fkan@amcc.com> you wrote:
>> From: Feng Kan<fkan@amcc.com>
>>
>> This is to lock down the ordering in the correction routine against
>> the calculate routine. Otherwise, incorrect define would cause ECC errors.
>>
>> Signed-off-by: Feng Kan<fkan@amcc.com>
>> Acked-by: Victor Gallardo<vgallardo@amcc.com>
>> ---
>> drivers/mtd/nand/ndfc.c | 6 ++++++
>> 1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
>> index 0dd6789..88e341d 100644
>> --- a/drivers/mtd/nand/ndfc.c
>> +++ b/drivers/mtd/nand/ndfc.c
>> @@ -89,9 +89,15 @@ static int ndfc_calculate_ecc(struct mtd_info *mtdinfo,
>>
>> /* The NDFC uses Smart Media (SMC) bytes order
>> */
>> +#ifdef CONFIG_MTD_NAND_ECC_SMC
>> ecc_code[0] = p[1];
>> ecc_code[1] = p[2];
>> ecc_code[2] = p[3];
>> +#else
>> + ecc_code[0] = p[2];
>> + ecc_code[1] = p[1];
>> + ecc_code[2] = p[3];
>> +#endif
>
> This patch seems wrong to me as CONFIG_MTD_NAND_ECC_SMC is nowhere
> defined. [Also, it's not documented anywhere.]
>
> If this is fixing a bug, then please describe the exact problem, how
> to reproduce it, and how this patch is supposed to fix this problem.
>
> As is, this makes no sense to me.
>
>
> Best regards,
>
> Wolfgang Denk
>
next prev parent reply other threads:[~2010-02-19 0:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 22:25 [U-Boot] [PATCH 1/1] ppc4xx: add support for alternate format for ndfc fkan at amcc.com
2010-02-18 23:13 ` Wolfgang Denk
2010-02-19 0:08 ` Feng Kan [this message]
2010-02-19 8:45 ` Wolfgang Denk
2010-02-19 7:57 ` Stefan Roese
2010-02-19 18:27 ` Feng Kan
2010-02-22 10:52 ` Stefan Roese
2010-02-22 18:06 ` Feng Kan
2010-02-22 20:54 ` Wolfgang Denk
2010-02-23 5:13 ` Feng Kan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B7DD691.8070805@amcc.com \
--to=fkan@amcc.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox