Jean-Philippe François a écrit :
Sundar a écrit :
Hi,

I think you can fine tune the EMIFA settings in the boot loader to
align with more optimized read/write latencies for the NAND in
question!
It looks as if they are already optimised :
Read and Write strobe are set to 4+1 = 5 clock cycle.
Correct me if I am wrong, but the asynchronous emif
is clocked with SYSCLK4.
SYSCLK4 is 121 MHz

I guess the timer are already optimised.

There is a bug in nand_read_skip_bad and
nand_write_skip_bad.
If there is no bad block in the range that
is read or written, the operation occurs twice.
Here is a patch that fix this.
This bug is still present in the last release of u-boot.

Since I am on vacation from now, I wont send this to u-boot ML until
I come back in two weeks.

Jean-Philippe François

:Index: u-boot-1.3.4-dav/drivers/mtd/nand/nand_util.c
===================================================================
--- u-boot-1.3.4-dav.orig/drivers/mtd/nand/nand_util.c 2009-03-02 17:48:32.000000000 +0100 +++ u-boot-1.3.4-dav/drivers/mtd/nand/nand_util.c 2009-07-10 18:08:50.000000000 +0200
@@ -496,14 +496,15 @@
        if (len_incl_bad == *length) {
                rval = nand_write (nand, offset, length, buffer);
                if (rval != 0) {
                        printf ("NAND write to offset %x failed %d\n",
                                offset, rval);
                        return rval;
                }
+               left_to_write -= *length;
        }

        while (left_to_write > 0) {
                size_t block_offset = offset & (nand->erasesize - 1);
                size_t write_size;

                if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
@@ -566,15 +567,16 @@
        if (len_incl_bad == *length) {
                rval = nand_read (nand, offset, length, buffer);
                if (rval != 0) {
                        printf ("NAND read from offset %x failed %d\n",
                                offset, rval);
                        return rval;
                }
-       }
+               left_to_read -= *length;
+    }

        while (left_to_read > 0) {
                size_t block_offset = offset & (nand->erasesize - 1);
                size_t read_length;

                if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
                        printf ("Skipping bad block 0x%08x\n",



ThanX!
Sundar

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source



_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source



_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to