diff options
author | Michal Simek <michal.simek@xilinx.com> | 2020-02-25 16:40:42 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2020-04-06 13:52:15 +0300 |
commit | 3811746ed9b48c8a538fc6a6edfe91aaf9acb76a (patch) | |
tree | 68d578afbe2f7aac9ab4f410471677363ac531b3 /drivers | |
parent | 36f1f3b640c52c9d28a92675b579c2905cee9c8f (diff) | |
download | u-boot-3811746ed9b48c8a538fc6a6edfe91aaf9acb76a.tar.xz |
nand: raw: zynq: Do not try to probe driver if nand flash is disabled
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 <michal.simek@xilinx.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/raw/zynq_nand.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/zynq_nand.c b/drivers/mtd/nand/raw/zynq_nand.c index 7039149692..0aea83dac0 100644 --- a/drivers/mtd/nand/raw/zynq_nand.c +++ b/drivers/mtd/nand/raw/zynq_nand.c @@ -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; |