[U-Boot] Regarding NAND flash support in IMX31

R Arun Kumar paiarunk at gmail.com
Fri Oct 16 05:54:26 CEST 2009


Hai,

The OOB layout of the (u-boot)/drivers/nand/nand_imx.c and
(kernel)/drivers/mtd/nand/mxc_nand.c are same.
I think the problem should be in the nand_bbt driver, since we run the
command *nand -a /dev/nand0.* *after the *addpart *command.
The command  *nand -a /dev/nand0.* *seems to be hanging .




u-boot/drivers/nand/nand-imx.c
------------------------------

/*
 * OOB placement block for use with hardware ecc generation
 */
static struct nand_ecclayout nand_hw_eccoob_8 = {
        .eccbytes = 5,
        .eccpos = {6, 7, 8, 9, 10},
        .oobfree = {{0, 5}, {11, 5}}
};

static struct nand_ecclayout nand_hw_eccoob_16 = {
        .eccbytes = 5,
        .eccpos = {6, 7, 8, 9, 10},
        .oobfree = {{0, 6}, {12, 4}}
};


kernel/drivers/mtd/nand/mxc_nd.c
--------------------------------

/*
 * OOB placement block for use with hardware ecc generation
 */
static struct nand_ecclayout nand_hw_eccoob_8 = {
        .eccbytes = 5,
        .eccpos = {6, 7, 8, 9, 10},
        .oobfree = {{0, 5}, {11, 5}}
};

static struct nand_ecclayout nand_hw_eccoob_16 = {
        .eccbytes = 5,
        .eccpos = {6, 7, 8, 9, 10},
        .oobfree = {{0, 6}, {12, 4}}
};


Arun


On Wed, Oct 14, 2009 at 5:42 PM, Juergen Beisert <jbe at pengutronix.de> wrote:

> Arun,
>
> On Mittwoch, 14. Oktober 2009, R Arun Kumar wrote:
> > Yes the NAND flash is working fine in linux and i am able to load the
> > filesystem and boot etc.
> > Since our NOR flash is of small size 2MB and the linux kernel needs to be
> > programmed in NAND, I am trying to use the NAND in uboot for saving the
> > kernel and boot the linux kernel from NAND flash
>
> Seems Linux is using a different OOB layout than u-boot does. Compare the
> OOB
> layout definition in (u-boot)/drivers/nand/nand_imx.c and
> (kernel)/drivers/mtd/nand/mxc_nand.c
>
> Regards,
> jbe
>
> --
> Pengutronix e.K.                              | Juergen Beisert
> |
> Linux Solutions for Science and Industry      | Phone: +49-8766-939 228
> |
> Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555
> |
> Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/ |
>



-- 
R Arun Kumar
+=================================================================+
http://www.paiarunk.net
Happy GoAround Way !!!!!!!!!!!!!!!!!
"Talk is cheap, Show me the code - LINUS TORVALDS"
+=================================================================+


More information about the U-Boot mailing list