How does one mount an existing jffs2 partition so it is writeable?

Conn Clark clark at esteem.com
Tue Aug 20 14:02:16 EDT 2002


Conn Clark wrote:
> 
> Christopher Hoover wrote:
> >
> > Do you need to unlock your flash before you can write to it?  That's not
> > done automatically by mtd or jffs2.  There's a diff in the ARM patch
> > system by me that might be applicable.
> >
> > -ch
> >
> > ______________________________________________________
> > Linux MTD discussion mailing list
> > http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 
> This is what I needed to know and is probably the culprit. However my unlock
> utility is broken. I can tell this because it doesn't even try to move through
> the sectors in the partition like the lock command does.
> 
> I think I have it under control now.
> 
> Thanks.
> 
>         Conn
 I meant to say move through the sectors like the erase command, however I
can see that the lock command works very similar to the unlock command. This
makes me suspect that I have something wrong in the kernel code.

here is what I have.

I am running on a MPC850 PowerPC processor.
I am using a single intel TE28F320C3BA110 flash chip mapped as a 16 bit device. 
I am using kernel 2.4.19 from kernel.org with the shared zlib patch.

I had to change 2 lines in cfi_cmdset_0001.c from

        extp->FeatureSupport = cfi32_to_cpu(extp->FeatureSupport);
        extp->BlkStatusRegMask = cfi32_to_cpu(extp->BlkStatusRegMask);

to

        extp->FeatureSupport = le32_to_cpu(extp->FeatureSupport);
        extp->BlkStatusRegMask = le16_to_cpu(extp->BlkStatusRegMask);

in order to fix an endian issue.

I had to create a custom map driver as well.

Any ideas on what else I have to change to get the lock/unlock commands to work?

Thanks in advance,
        Conn
-- 

*****************************************************************
  If you live at home long enough, your parents will move out.
 (Warning they may try to sell their house out from under you.)
*****************************************************************

Conn Clark
Engineering Stooge				clark at esteem.com
Electronic Systems Technology Inc.		www.esteem.com

Stock Ticker Symbol				ELST

"clark at esteem.com" Copyright 2000 By Electronic Systems Technology
 This email address may be used to communicate to Conn Clark
 provided it is not being used for advertisement purposes, unless
 prior written consent is given. This email address may not be 
 sold under any circumstances. All other rights reserved.




More information about the linux-mtd mailing list