Patchwork nand, davinci: if no amif timing is passed, don; t setup cscfg register

login
register
mail settings
Submitter Heiko Schocher
Date Dec. 4, 2011, 9:37 a.m.
Message ID <1322991456-20690-1-git-send-email-hs@denx.de>
Download mbox | patch
Permalink /patch/129131/
State New
Headers show

Comments

Heiko Schocher - Dec. 4, 2011, 9:37 a.m.
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: linux-mtd@lists.infradead.org
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Wolfgang Denk <wd@denx.de>
---
 drivers/mtd/nand/davinci_nand.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Artem Bityutskiy - Dec. 5, 2011, 6:53 a.m.
Pushed to l2-mtd-2.6.git, thanks!

Artem.

Patch

diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index c153e1f..6e56615 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -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");