mtd: rawnand: Fill memorg during detection
If we want to use the generic NAND layer, we need to have the memorg struct appropriately filled. Patch the detection code to fill this struct. Signed-off-by: Boris Brezillon <bbrezillon@kernel.org> Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:

کامیت شده توسط
Miquel Raynal

والد
3020e30af6
کامیت
629a442cad
@@ -101,6 +101,9 @@ static void toshiba_nand_benand_init(struct nand_chip *chip)
|
||||
static void toshiba_nand_decode_id(struct nand_chip *chip)
|
||||
{
|
||||
struct mtd_info *mtd = nand_to_mtd(chip);
|
||||
struct nand_memory_organization *memorg;
|
||||
|
||||
memorg = nanddev_get_memorg(&chip->base);
|
||||
|
||||
nand_decode_ext_id(chip);
|
||||
|
||||
@@ -114,8 +117,10 @@ static void toshiba_nand_decode_id(struct nand_chip *chip)
|
||||
*/
|
||||
if (chip->id.len >= 6 && nand_is_slc(chip) &&
|
||||
(chip->id.data[5] & 0x7) == 0x6 /* 24nm */ &&
|
||||
!(chip->id.data[4] & 0x80) /* !BENAND */)
|
||||
mtd->oobsize = 32 * mtd->writesize >> 9;
|
||||
!(chip->id.data[4] & 0x80) /* !BENAND */) {
|
||||
memorg->oobsize = 32 * memorg->pagesize >> 9;
|
||||
mtd->oobsize = memorg->oobsize;
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract ECC requirements from 6th id byte.
|
||||
|
مرجع در شماره جدید
Block a user