Skip to content

Commit

Permalink
nand: raw: zynq: Do not try to probe driver if nand flash is disabled
Browse files Browse the repository at this point in the history
There is no reason to continue when DT status property indicates that NAND
flash is disabled. But that means that NOR flash should be present that's
why try it find it out.

Signed-off-by: Michal Simek <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
  • Loading branch information
Michal Simek committed Apr 6, 2020
1 parent 36f1f3b commit 3811746
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/mtd/nand/raw/zynq_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,11 @@ static int zynq_nand_probe(struct udevice *dev)
return -ENODEV;
}

if (!ofnode_is_available(of_nand)) {
debug("Nand node in dt disabled\n");
return dm_scan_fdt_dev(dev);
}

if (ofnode_read_resource(of_nand, 0, &res)) {
printf("Failed to get nand resource\n");
return -ENODEV;
Expand Down

0 comments on commit 3811746

Please sign in to comment.