diff --git a/drivers/mtd/mtd_blk.c b/drivers/mtd/mtd_blk.c index fe5eb63635..1c233c3658 100644 --- a/drivers/mtd/mtd_blk.c +++ b/drivers/mtd/mtd_blk.c @@ -184,6 +184,8 @@ static int mtd_blk_probe(struct udevice *udev) memcpy(desc->product, mtd->name, strlen(mtd->name)); memcpy(desc->revision, "V1.00", sizeof("V1.00")); if (mtd->type == MTD_NANDFLASH) { + if (desc->devnum == BLK_MTD_NAND) + mtd = dev_get_priv(udev->parent); /* * Find the first useful block in the end, * and it is the end lba of the nand storage.