Re: JFFS2 FS not writeable

2008-05-28 Thread Ron Madrid
So I found something that looks suspicious to me. 
This may not be a fsl_elbc_nand.c problem, but a more
general problem.

Shortly after mounting the root filesystem, which is a
jffs2 on a large page NAND device (my board is based
on the MPC8313) the kernel appears to read the device
starting just past the point defined by the 0x1985 . .
. markers in the jffs2 filesystem, through the end of
the device as defined by the dtb.  More specifically
in my device, the file system is approximately
0x20 and resides at 0x40 with the end of the
device being 0x200.  As it does this it is then
writing the oob data into these blocks (0x60 -
0x1fe).   The value that it was writing into the
first 4 bytes of the oob are 0xff198520.  This was
problematic as the 0x20 was being placed into the
large page NAND device bad block location (0x0). 
Given that there is a 0xff at the msb of the oob data,
could this possibly be a byte swapping issue?  I don't
see though how this could be a problem in the large
page NAND but not the small page NAND.  I verified
this by writing 0x in to the first 4 bytes of
the oob data to ensure that 0xff was written into the
bad block location.

In the function fsl_elbc_write_buf:
(*(unsigned int *)buf) = 0x;

I know that this isn't a fix, but I don't know where
this problem comes from and also I don't know the
exact flow of the NAND device processes.

I would be more than happy to investigate further and
provide a patch if someone could point me in the right
direction.

Let me know if I'm off base here, but I think this is
where my problem is.

Ron Madrid
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: JFFS2 FS not writeable

2008-05-28 Thread Scott Wood

Ron Madrid wrote:

--- Scott Wood <[EMAIL PROTECTED]> wrote:

You may want to try increasing the OR[SCY] field or
other timing 
parameters associated with the NAND flash.


So are you saying that when this happened in the past
it was a timing issue?  This change would need to
happen in u-boot correct?


Well, there was a bug that accidentally changed SCY from 1 to 0. :-P

U-boot would be the ideal place to fix it, but if you're only accessing 
the flash from Linux, it could be changed in platform code.


-Scott
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: JFFS2 FS not writeable

2008-05-28 Thread Ron Madrid
--- Scott Wood <[EMAIL PROTECTED]> wrote:
> You may want to try increasing the OR[SCY] field or
> other timing 
> parameters associated with the NAND flash.

So are you saying that when this happened in the past
it was a timing issue?  This change would need to
happen in u-boot correct?

Ron
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: JFFS2 FS not writeable

2008-05-27 Thread Scott Wood

Ron Madrid wrote:

In which function should I start searching for this
problem?  What would cause a block to be marked bad?


No particular function; just something that causes things to not work. :-P

You may want to try increasing the OR[SCY] field or other timing 
parameters associated with the NAND flash.


-Scott
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: JFFS2 FS not writeable

2008-05-27 Thread Ron Madrid
In which function should I start searching for this
problem?  What would cause a block to be marked bad?

Ron
--- Scott Wood <[EMAIL PROTECTED]> wrote:

> Ron Madrid wrote:
> > I have tried the latest code and now, I'm able to
> > write a limited amount.  After which when I
> reboot,
> > more than 100 contiguous blocks have been marked
> bad,
> > through the end of the device (according to the
> dts). 
> > Is this something that has been seen before?
> 
> Yes, but not with the latest code.
> 
>  > My NAND device is a large page.
> 
> I've only had small page devices to test on, so it's
> quite likely that 
> there's a large page bug in the driver somewhere.
> 
> If your erase block size is not 128K, try the latest
> set_addr patch in 
> the mtd-2.6.22.1 branch of u-boot-nand-flash (I
> still need to send it 
> out for Linux).
> 
> -Scott
> 

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: JFFS2 FS not writeable

2008-05-27 Thread Scott Wood

Ron Madrid wrote:

I have tried the latest code and now, I'm able to
write a limited amount.  After which when I reboot,
more than 100 contiguous blocks have been marked bad,
through the end of the device (according to the dts). 
Is this something that has been seen before?


Yes, but not with the latest code.

> My NAND device is a large page.

I've only had small page devices to test on, so it's quite likely that 
there's a large page bug in the driver somewhere.


If your erase block size is not 128K, try the latest set_addr patch in 
the mtd-2.6.22.1 branch of u-boot-nand-flash (I still need to send it 
out for Linux).


-Scott
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: JFFS2 FS not writeable

2008-05-27 Thread Ron Madrid
I have tried the latest code and now, I'm able to
write a limited amount.  After which when I reboot,
more than 100 contiguous blocks have been marked bad,
through the end of the device (according to the dts). 
Is this something that has been seen before?  My NAND
device is a large page.

Ron
--- Scott Wood <[EMAIL PROTECTED]> wrote:

> Ron Madrid wrote:
> > I'm trying to make new directories, create files,
> save
> > changes to files, etc. and when I reboot my
> changes
> > are not being saved.  I'm sorry if this is vague,
> but
> > I haven't run into this problem before in previous
> > kernels.  I'm using 2.6.25 and my configuration is
> > very similar to mpc8313erdb_defconfig, with
> changes to
> > include NAND support as my flash device is a NAND.
> 
> > Also, my dts is very similar to mpc8313erdb.dts as
> > well.  I don't know where to start looking for the
> > problem as there is no error.  Here is what is
> printed
> > on boot.
> 
> Try head-of-tree; there have been several fixes to
> the eLBC FCM NAND driver.
> 
> -Scott
> 

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: JFFS2 FS not writeable

2008-05-22 Thread Sean MacLennan
On Thu, 22 May 2008 13:36:32 -0700 (PDT)
"Ron Madrid" <[EMAIL PROTECTED]> wrote:

> I'm trying to make new directories, create files, save
> changes to files, etc. and when I reboot my changes
> are not being saved.  I'm sorry if this is vague, but
> I haven't run into this problem before in previous
> kernels.  I'm using 2.6.25 and my configuration is
> very similar to mpc8313erdb_defconfig, with changes to
> include NAND support as my flash device is a NAND. 
> Also, my dts is very similar to mpc8313erdb.dts as
> well.  I don't know where to start looking for the
> problem as there is no error.  Here is what is printed
> on boot.

Are you sure the mount is working? What does the output of mount say?

Cheers,
  Sean
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: JFFS2 FS not writeable

2008-05-22 Thread Scott Wood

Ron Madrid wrote:

I'm trying to make new directories, create files, save
changes to files, etc. and when I reboot my changes
are not being saved.  I'm sorry if this is vague, but
I haven't run into this problem before in previous
kernels.  I'm using 2.6.25 and my configuration is
very similar to mpc8313erdb_defconfig, with changes to
include NAND support as my flash device is a NAND. 
Also, my dts is very similar to mpc8313erdb.dts as

well.  I don't know where to start looking for the
problem as there is no error.  Here is what is printed
on boot.


Try head-of-tree; there have been several fixes to the eLBC FCM NAND driver.

-Scott
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev