mtd: mtd_blk: support map bad block table in spl
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com> Change-Id: I48112628812b948e4ab5a34362c8ada12b00471e
This commit is contained in:
parent
2ac88c1bbc
commit
51ceae363d
|
|
@ -39,11 +39,11 @@ int mtd_blk_map_table_init(struct blk_desc *desc,
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (desc->devnum == BLK_MTD_NAND) {
|
if (desc->devnum == BLK_MTD_NAND) {
|
||||||
#if defined(CONFIG_NAND) && !defined(CONFIG_SPL_BUILD)
|
#if defined(CONFIG_NAND)
|
||||||
mtd = dev_get_priv(desc->bdev->parent);
|
mtd = dev_get_priv(desc->bdev->parent);
|
||||||
#endif
|
#endif
|
||||||
} else if (desc->devnum == BLK_MTD_SPI_NAND) {
|
} else if (desc->devnum == BLK_MTD_SPI_NAND) {
|
||||||
#if defined(CONFIG_MTD_SPI_NAND) && !defined(CONFIG_SPL_BUILD)
|
#if defined(CONFIG_MTD_SPI_NAND)
|
||||||
mtd = desc->bdev->priv;
|
mtd = desc->bdev->priv;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue