drivers: core: do not use mtd node from kernel dtb

Do not use mtd node from kernel dtb, otherwise the driver will
be initialized twice.

Change-Id: I6f3dca8fd8c3e05475f4359fe6c3c5312c0984cd
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
Jason Zhu 2019-06-21 18:00:40 +08:00 committed by Jianhong Chen
parent 57b5e70433
commit 5a1674a738
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
if (gd->flags & GD_FLG_RELOC) {
/* For mmc/nand/spiflash, just update from kernel dtb instead bind again*/
if (drv->id == UCLASS_MMC || drv->id == UCLASS_RKNAND ||
drv->id == UCLASS_SPI_FLASH) {
drv->id == UCLASS_SPI_FLASH || drv->id == UCLASS_MTD) {
list_for_each_entry(dev, &uc->dev_head, uclass_node) {
if (!strcmp(name, dev->name)) {
debug("%s do not bind dev already in list %s\n",