mtd: davinci: if no amif timing is passed, don; t setup cscfg register
authorHeiko Schocher <hs@denx.de>
Sun, 4 Dec 2011 09:37:36 +0000 (10:37 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 9 Jan 2012 18:13:25 +0000 (18:13 +0000)
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/davinci_nand.c

index c153e1f77f90d0e58dc6d892f2395a71e500b7ef..6e566156956f2465e32b122d7728d9890ed98f08 100644 (file)
@@ -675,7 +675,9 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
 
        davinci_nand_writel(info, A1CR_OFFSET + info->core_chipsel * 4, val);
 
-       ret = davinci_aemif_setup_timing(info->timing, info->base,
+       ret = 0;
+       if (info->timing)
+               ret = davinci_aemif_setup_timing(info->timing, info->base,
                                                        info->core_chipsel);
        if (ret < 0) {
                dev_dbg(&pdev->dev, "NAND timing values setup fail\n");