[PATCH] mtd: nand: gpmi: reset BCH earlier, too, to avoid NAND startup problems

Huang Shijie shijie8 at gmail.com
Thu Dec 6 09:58:13 EST 2012

On Thu, Dec 6, 2012 at 4:52 AM, Wolfram Sang <w.sang at pengutronix.de> wrote:
> On Thu, Dec 06, 2012 at 10:16:08AM +0800, Huang Shijie wrote:
>> 于 2012年12月06日 04:46, Wolfram Sang 写道:
>> > correctly after warm rebooting, so the kernel could not find the UBI or
>> which Soc do you meet this issue? the mx23 or mx28?
> MX28.
>> It's bad news to me. I ever thought the BCH-reset-issue is gone.
>> I ever tested many times in mx28(> 10000 times) with freescale's uboot.
> Did you power-cycle between each test or reboot? I still need to test if
What's the meaning of "power-cycle"?
I only tested with the soft reset, the power is never shut down.

> this really makes a difference, but I think the issue shows more often
> when only rebooting.
>> I guest you are not use the freescale's uboot. The uboot also will reset
>> the BCH/GPMI.
> I just checked its sources. It also has this flaw. GPMI and BCH need to
> be reset at the same time, i.e. before first commands are sent to the
> NAND (although they don't need ECC).

With your patch, we have resetted the BCH twice in the driver. Could
we only reset BCH one time?
Do you ever remove another reset-bch code, and test it?
Frankly speaking, it's strange to reset the BCH twice, and it makes no sense. :(
I am afraid that we have to add three-reset-bch in the future, if we
can not find the root cause.
If you can remove another reset-bch code, i will ack the patch.

> I use barebox, but that isn't of importance here. If I don't fix
> barebox, I see NAND issues in barebox or the kernel. If I fix barebox, I
> still see issues in the kernel, but not in barebox anymore.
I ever met the same case with the freescale's BSP code.
I fixed the issue in uboot, and fixed the driver too.

> The setup needs to be done properly to ensure a consistent state at the
> beginning, especially when somebody used the NAND before (ROM code,
At the beginning? it's really interesting.
I want to test it myself.

could you wait for some time?

Best Regards
Huang Shijie

> bootloader). Fixing the bootloader alone is not enough.
> Thanks,
>    Wolfram
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Version: GnuPG v1.4.10 (GNU/Linux)
> /mUAoJN91gz+1QiqVUsNdHtwX9jpAdZC
> =nMk3
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

More information about the linux-mtd mailing list