]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
nand: raw: zynq: Do not try to probe driver if nand flash is disabled
authorMichal Simek <michal.simek@xilinx.com>
Tue, 25 Feb 2020 13:40:42 +0000 (14:40 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 6 Apr 2020 10:52:15 +0000 (12:52 +0200)
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>
drivers/mtd/nand/raw/zynq_nand.c

index 7039149692897a3cee0818163fee80a8924c10b0..0aea83dac0e66a8cb86f4f77296c735704be43bc 100644 (file)
@@ -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;