[Yaffs] Moving forward with the RB1xx old-yaffs problem.

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: David Goodenough
Date:  
To: yaffs
Subject: [Yaffs] Moving forward with the RB1xx old-yaffs problem.
OK, I have made progress, but not solved the problem. I now have
nanddump no longer complaining about ECC errors.

I did this by defining an ecclayout in my nand chip driver, so that
all access to this device uses the old ecc layout. The ecclayout
I use is:-

static struct nand_ecclayout rb_ecclayout = {
        .eccbytes = 6,
        .eccpos = { 8, 9, 10, 13, 14, 15 },
        .oobfree = { { 0, 5 }, { 6, 2 }, { 11, 2 } }
};


and then when initialising the nand_chip structure in my driver I
use:-

        rnand.ecc.layout = &rb_ecclayout;


This was derived from Ian McDonnel's emails (thank you for those) and
once I had worked out I needed a nand_ecclayout rather than a
nand_ooblayout (which I think must be for the older MTD support) I
got to where I am now. The only thing that confuses me is that this
is an 8bit chip, but this ecclayout looks more like a 16bit one than
an 8bit one, but that may simply be a feature of the old Yaffs layout.

But now I have a Yaffs problem (I suspect).

When I mount the partition I no longer get complaints about bad blocks
or any of the other odd messages I used to get, but I get no files in
the partition. Yet the first block contains the same information it
has always contained, i.e. the file header for the file "kernel".

My guess is that this is because the Yaffs code is still using the new
layout even though the MTD code is using the old layout.

Any ideas as to either how I should configure Yaffs to force the use
of the old layout, or if changes are needed to any of the Yaffs code
what they should be?

David