0

MT29F2G08ABAGAWP我有一个带闪存的stm32板,我有一个带MT29F2G08ABAEAWP闪存的板,区别在于OOB,第一个OOB是64字节,第二个OOB是128字节,我在任何地方都找不到公式LEB计算后找不到第二次闪存的PEB参数,数据表中有参数:

for MT29F2G08ABAEAWP first: 
Page size x8: 2112 bytes (2048 + 64 bytes);
Block size: 64 pages (128K + 4K bytes);
Device size: 2Gb: 2048 blocks.
for MT29F2G08ABAGAWP second, for which I cannot calculate the values:
Page size x8: 2176 bytes (2048 + 128 bytes);
Block size: 64 pages (128K + 8K bytes);
Device size: 2Gb: 2048 blocks.

如果你知道如何从这些参数中计算 LEB、PEB、sub-page-size、maximum-logical-erase-block-count、minimum-I/O-unit-size,请告诉我,Google 没有给出答案。

4

1 回答 1

0

解决方案:

diff -Naur uboot-2017.11_orig/drivers/mtd/nand/nand_base.c uboot-2017.11/drivers/mtd/nand/nand_base.c
--- uboot-2017.11_orig/drivers/mtd/nand/nand_base.c 2021-08-05 17:50:55.136923003 +0300
+++ uboot-2017.11/drivers/mtd/nand/nand_base.c  2021-08-06 14:10:22.395612680 +0300
@@ -3440,7 +3440,7 @@
            mtd->oobsize = 448;
            break;
        case 3:
-           mtd->oobsize = 64;
+           mtd->oobsize = 128;
            break;
        case 4:
            mtd->oobsize = 32;
@@ -3467,8 +3467,7 @@
        mtd->writesize = 1024 << (extid & 0x03);
        extid >>= 2;
        /* Calc oobsize */
-       mtd->oobsize = (8 << (extid & 0x01)) *
-           (mtd->writesize >> 9);
+       mtd->oobsize = 128;
        extid >>= 2;
        /* Calc blocksize. Blocksize is multiples of 64KiB */
        mtd->erasesize = (64 * 1024) << (extid & 0x03);
@@ -3488,7 +3487,7 @@
                nand_is_slc(chip) &&
                (id_data[5] & 0x7) == 0x6 /* 24nm */ &&
                !(id_data[4] & 0x80) /* !BENAND */) {
-           mtd->oobsize = 32 * mtd->writesize >> 9;
+           mtd->oobsize = 128;
        }
 
    }
于 2021-08-06T13:18:31.737 回答