[U-Boot] [PATCH v8 0/5] mtd: nand: omap: optimize and clean-up of OMAP NAND driver

Gupta, Pekon pekon at ti.com
Wed Nov 6 20:20:05 CET 2013


Hi Matti and Matthias

Sorry I was away from my mailbox so couldn't reply you earlier.
I'm still away from my setup and other boards, so cannot replicate
the issue below until early next week. But I'll surely do so asap..

However, please see my replies below, which might help you someway.


> From: matti kaasinen [mailto:matti.kaasinen at gmail.com] 
> Hi Pekon,
> Thanks to Tom Rini's hint I have tried to execute your patch sets
> (http://patchwork.ozlabs.org/project/uboot/list/?submitter=17320&state=*)
>  in order to get Linux and U-Boot working with same NAND flash.
> Set-up is pretty much like Mathias has before in this chain.
> Latest problem I faced with is that last versions of
>  1)  "[U-Boot,v8,3/5] mtd: nand: omap: optimize chip->ecc.calculate() for H/W ECC schemes"
>  and 2) "[U-Boot,v2,2/3] mtd: nand: omap: add support for BCH16_ECC - NAND driver updates"	
> are not compatible any more. As I told in
> https://groups.google.com/forum/#!topic/beagleboard/7ofbE_Rrn_s
> versions v5..v7 of 1) could possibly be compatible. 

There is no change in ECC layout or other functional updates between
v7 and v8 of this patch, so if there is any incompatibility then it would
be in all versions of the patch..
Few questions.. 
(1) Which ECC scheme are you using ?
- u-boot 
	CONFIG_NAND_OMAP_ECCSCHEME as per doc/README.nand
	http://lists.denx.de/pipermail/u-boot/2013-October/164646.html
- kernel
	OMAP_ECC_BCH8_CODE_HW
	OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
	Or any other..


(2) Is the problem related to incorrect read/write access to x16 NAND ?
Or 
Is it incompatibility in ecc.layout ?
You can check this by dumping raw nand page via 'nand dump' command
from both u-boot and kernel.


(3) you should not pick BCH16 patch-series
- because I have not rebased this patch, and re-tested since other
   base patch-series on which BCH16 will be build, is still not accepted.
- Also BCH16 ecc scheme would work only for 
   NAND device with pagesize=4K and oobsize=224.
   whereas current beaglebone capes have
   NAND device with pagesize=2K and oobsize=64, so you can only use
   BCH8 with current NAND capes (for now)..



> > 2013/11/1 Matthias Fuchs <mfuchs at ma-fu.de>
> > Hi Pekon,
> >
> > should I consider the U-Boot and Linux am335x NAND
> > implementation to be compatible? So are the ECC schemes
> > in a way identical that I can nandwrite a kernel image from
> > Linux and "nand read" it from U-Boot? I tested with the 3.8.13
> > beaglebone kernel (which is of course not very representative)
> >  and it does not work. If it should work, do you know it that was
> > already the case before your patches and with which Linux kernel?

I don't think any earlier kernel versions ever supported beaglebone
Its only recently that a major patch-series of NAND driver was
accepted and  tested on beaglebone.
The patches  are currently in l2-mtd.git tree which should make into
3.13 kernel, before being in linux-next for sometime.
(a) Reference: 
http://lists.infradead.org/pipermail/linux-mtd/2013-October/049462.html

(b) In addition to above series, you might need beaglebone DTS updates
which you can refer from below ..
http://lists.infradead.org/pipermail/linux-mtd/2013-October/049438.html


with regards, pekon


More information about the U-Boot mailing list