Commit a126483e82957172b8a93ebb1d30fb2b1df3cbbc
Committed by
Miquel Raynal
1 parent
6fbc7275c7
mtd: spinand: Fix max_bad_eraseblocks_per_lun info in memorg
The 1Gb Macronix chip can have a maximum of 20 bad blocks, while the 2Gb version has twice as many blocks and therefore the maximum number of bad blocks is 40. The 4Gb GigaDevice GD5F4GQ4xA has twice as many blocks as its 2Gb counterpart and therefore a maximum of 80 bad blocks. Fixes: 377e517b5fa5 ("mtd: nand: Add max_bad_eraseblocks_per_lun info to memorg") Reported-by: Emil Lenngren <emil.lenngren@gmail.com> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff
drivers/mtd/nand/spi/gigadevice.c
... | ... | @@ -180,7 +180,7 @@ |
180 | 180 | SPINAND_ECCINFO(&gd5fxgq4xa_ooblayout, |
181 | 181 | gd5fxgq4xa_ecc_get_status)), |
182 | 182 | SPINAND_INFO("GD5F4GQ4xA", 0xF4, |
183 | - NAND_MEMORG(1, 2048, 64, 64, 4096, 40, 1, 1, 1), | |
183 | + NAND_MEMORG(1, 2048, 64, 64, 4096, 80, 1, 1, 1), | |
184 | 184 | NAND_ECCREQ(8, 512), |
185 | 185 | SPINAND_INFO_OP_VARIANTS(&read_cache_variants, |
186 | 186 | &write_cache_variants, |
drivers/mtd/nand/spi/macronix.c
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | |
101 | 101 | static const struct spinand_info macronix_spinand_table[] = { |
102 | 102 | SPINAND_INFO("MX35LF1GE4AB", 0x12, |
103 | - NAND_MEMORG(1, 2048, 64, 64, 1024, 40, 1, 1, 1), | |
103 | + NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1), | |
104 | 104 | NAND_ECCREQ(4, 512), |
105 | 105 | SPINAND_INFO_OP_VARIANTS(&read_cache_variants, |
106 | 106 | &write_cache_variants, |
... | ... | @@ -109,7 +109,7 @@ |
109 | 109 | SPINAND_ECCINFO(&mx35lfxge4ab_ooblayout, |
110 | 110 | mx35lf1ge4ab_ecc_get_status)), |
111 | 111 | SPINAND_INFO("MX35LF2GE4AB", 0x22, |
112 | - NAND_MEMORG(1, 2048, 64, 64, 2048, 20, 2, 1, 1), | |
112 | + NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 2, 1, 1), | |
113 | 113 | NAND_ECCREQ(4, 512), |
114 | 114 | SPINAND_INFO_OP_VARIANTS(&read_cache_variants, |
115 | 115 | &write_cache_variants, |