mtd: mtd_blk: fix get: mtd error if device is nand
Change-Id: I1cebba63cbabefa87fd67d98a4d93e151604626d Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
parent
4bac908b8b
commit
f3ba630b34
|
|
@ -184,6 +184,8 @@ static int mtd_blk_probe(struct udevice *udev)
|
||||||
memcpy(desc->product, mtd->name, strlen(mtd->name));
|
memcpy(desc->product, mtd->name, strlen(mtd->name));
|
||||||
memcpy(desc->revision, "V1.00", sizeof("V1.00"));
|
memcpy(desc->revision, "V1.00", sizeof("V1.00"));
|
||||||
if (mtd->type == MTD_NANDFLASH) {
|
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,
|
* Find the first useful block in the end,
|
||||||
* and it is the end lba of the nand storage.
|
* and it is the end lba of the nand storage.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue