* [U-Boot] [MX51EVK] u-boot ECC errors flashing NAND
@ 2011-01-10 12:58 Tiago Maluta
2011-01-10 13:08 ` Stefano Babic
2011-01-10 15:21 ` Jason Liu
0 siblings, 2 replies; 6+ messages in thread
From: Tiago Maluta @ 2011-01-10 12:58 UTC (permalink / raw)
To: u-boot
Hi,
I'm facing ECC errors when flashing u-boot on NAND on MX51EVK-based
board. U-Boot "nand write" command doesn't fill out-of-band (OOB)
bytes correctly. I noted this behavior after compare the same
u-boot.bin image flashed via ATK (proprietary software from
Freescale). I guess is something related to ECC timing.
my logs:
http://farm6.static.flickr.com/5130/5320148028_7da19d3cf2_o.png
http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-fail.txt
http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-ok.txt
I also tried "flash_eraseall" and "nandwrite -p" on /dev/mtd0 from a
linux instance and I got the same OOB errors.
--tm
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [MX51EVK] u-boot ECC errors flashing NAND
2011-01-10 12:58 [U-Boot] [MX51EVK] u-boot ECC errors flashing NAND Tiago Maluta
@ 2011-01-10 13:08 ` Stefano Babic
2011-01-10 13:44 ` Tiago Maluta
2011-01-10 15:21 ` Jason Liu
1 sibling, 1 reply; 6+ messages in thread
From: Stefano Babic @ 2011-01-10 13:08 UTC (permalink / raw)
To: u-boot
On 01/10/2011 01:58 PM, Tiago Maluta wrote:
> Hi,
>
Hi Tiago,
> I'm facing ECC errors when flashing u-boot on NAND on MX51EVK-based
> board. U-Boot "nand write" command doesn't fill out-of-band (OOB)
> bytes correctly.
The mxc_nand driver in u-boot mainline does not support version 3 of the
internal NFC controller we find on the i.MX51 processor. You should have
patched the driver to adapt it for the i.MX51, or you are using other
sources. If you have patched the actual driver, please post your patch
for review.
> my logs:
> http://farm6.static.flickr.com/5130/5320148028_7da19d3cf2_o.png
> http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-fail.txt
> http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-ok.txt
It seems to me you are not using u-boot mainline...
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [MX51EVK] u-boot ECC errors flashing NAND
2011-01-10 13:08 ` Stefano Babic
@ 2011-01-10 13:44 ` Tiago Maluta
2011-01-10 14:45 ` Stefano Babic
0 siblings, 1 reply; 6+ messages in thread
From: Tiago Maluta @ 2011-01-10 13:44 UTC (permalink / raw)
To: u-boot
>> I'm facing ECC errors when flashing u-boot on NAND on MX51EVK-based
>> board. U-Boot "nand write" command doesn't fill out-of-band (OOB)
>> bytes correctly.
>
> The mxc_nand driver in u-boot mainline does not support version 3 of the
> internal NFC controller we find on the i.MX51 processor. You should have
> patched the driver to adapt it for the i.MX51, or you are using other
> sources. If you have patched the actual driver, please post your patch
> for review.
>
I'd like to adapt u-boot to work with NFC v3. Do you think it's a
difficult task (and the documentation [1] available should be
sufficient) ?
[1] http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX51RM.pdf
>> my logs:
>> http://farm6.static.flickr.com/5130/5320148028_7da19d3cf2_o.png
>> http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-fail.txt
>> http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-ok.txt
>
> It seems to me you are not using u-boot mainline...
>
Sorry I forgot to mention, originally I wasn't using u-boot from
mainline (my tests refer to u-boot from freescale -r9.2) but I'm
switching to use u-boot from mainline on the board so I'm asking here
instead of "freescale's channel". Whenever possible, using a free
software solution is the best solution.
--tm
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [MX51EVK] u-boot ECC errors flashing NAND
2011-01-10 13:44 ` Tiago Maluta
@ 2011-01-10 14:45 ` Stefano Babic
0 siblings, 0 replies; 6+ messages in thread
From: Stefano Babic @ 2011-01-10 14:45 UTC (permalink / raw)
To: u-boot
On 01/10/2011 02:44 PM, Tiago Maluta wrote:
> I'd like to adapt u-boot to work with NFC v3. Do you think it's a
> difficult task (and the documentation [1] available should be
> sufficient) ?
>
> [1] http://cache.freescale.com/files/dsp/doc/ref_manual/MCIMX51RM.pdf
I think there is no other documentation, except the Errata for the chip.
My suggestion is to take a look at the linux driver, as NAND is already
supported in mainline linux (if I am not wrong).
I think you can drop the "auto" support in the NAND controller, as this
is helpful with more as one chip. Maybe it can be added in a second time.
> Sorry I forgot to mention, originally I wasn't using u-boot from
> mainline (my tests refer to u-boot from freescale -r9.2) but I'm
> switching to use u-boot from mainline on the board so I'm asking here
> instead of "freescale's channel". Whenever possible, using a free
> software solution is the best solution.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [MX51EVK] u-boot ECC errors flashing NAND
2011-01-10 12:58 [U-Boot] [MX51EVK] u-boot ECC errors flashing NAND Tiago Maluta
2011-01-10 13:08 ` Stefano Babic
@ 2011-01-10 15:21 ` Jason Liu
2011-01-10 18:00 ` Tiago Maluta
1 sibling, 1 reply; 6+ messages in thread
From: Jason Liu @ 2011-01-10 15:21 UTC (permalink / raw)
To: u-boot
Hi, Tiago Maluta,
2011/1/10 Tiago Maluta <tiago.maluta@gmail.com>:
> Hi,
>
> I'm facing ECC errors when flashing u-boot on NAND on MX51EVK-based
> board. U-Boot "nand write" command doesn't fill out-of-band (OOB)
> bytes correctly. I noted this behavior after compare the same
> u-boot.bin image flashed via ATK (proprietary software from
> Freescale). I guess is something related to ECC timing.
>
> my logs:
> http://farm6.static.flickr.com/5130/5320148028_7da19d3cf2_o.png
> http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-fail.txt
> http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-ok.txt
I have looked at your log and it turns out that the issued is caused that BI
SWAP unbalance when you do NAND read and write. BI SWAP is used to
keep the NAND bad block indicator out of factory, otherwise, the bad block
indicator will be overwritten with user data.
BR,
Jason
>
> --tm
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [MX51EVK] u-boot ECC errors flashing NAND
2011-01-10 15:21 ` Jason Liu
@ 2011-01-10 18:00 ` Tiago Maluta
0 siblings, 0 replies; 6+ messages in thread
From: Tiago Maluta @ 2011-01-10 18:00 UTC (permalink / raw)
To: u-boot
On Mon, Jan 10, 2011 at 1:21 PM, Jason Liu <liu.h.jason@gmail.com> wrote:
> Hi, Tiago Maluta,
>
> 2011/1/10 Tiago Maluta <tiago.maluta@gmail.com>:
>> Hi,
>>
>> I'm facing ECC errors when flashing u-boot on NAND on MX51EVK-based
>> board. U-Boot "nand write" command doesn't fill out-of-band (OOB)
>> bytes correctly. I noted this behavior after compare the same
>> u-boot.bin image flashed via ATK (proprietary software from
>> Freescale). I guess is something related to ECC timing.
>>
>> my logs:
>> http://farm6.static.flickr.com/5130/5320148028_7da19d3cf2_o.png
>> http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-fail.txt
>> http://www.coding.com.br/wp-content/uploads/2011/01/nand-dump-ok.txt
>
> I have looked at your log and it turns out that the issued is caused that BI
> SWAP unbalance when you do NAND read and write. BI SWAP is used to
> keep the NAND bad block indicator out of factory, otherwise, the bad block
> indicator will be overwritten with user data.
>
What's your suggestion(s) to fix that?
By now I'm comparing with $KERNEL/drivers/mtd/nand/mxc_nand.c [1] to
see how to add NFC v3 support on u-boot code.
[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=drivers/mtd/nand/mxc_nand.c;h=214b03afdd482920adda308e51088092d884a2d1;hb=0c21e3aaf6ae85bee804a325aa29c325209180fd
--tm
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-10 18:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-10 12:58 [U-Boot] [MX51EVK] u-boot ECC errors flashing NAND Tiago Maluta
2011-01-10 13:08 ` Stefano Babic
2011-01-10 13:44 ` Tiago Maluta
2011-01-10 14:45 ` Stefano Babic
2011-01-10 15:21 ` Jason Liu
2011-01-10 18:00 ` Tiago Maluta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox