[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Nov 2013 17:10:53 +0000
From: "Khoronzhuk, Ivan" <ivan.khoronzhuk@...com>
To: "Shilimkar, Santosh" <santosh.shilimkar@...com>,
Rob Landley <rob@...dley.net>,
Russell King <linux@....linux.org.uk>
CC: "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Rob Herring <rob.herring@...xeda.com>,
Stephen Warren <swarren@...dotorg.org>,
Kumar Gala <galak@...nel.crashing.org>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"Strashko, Grygorii" <grygorii.strashko@...com>
Subject: [PATCH 10/12] mtd: nand: davinci: don't set timings if AEMIF is used
If Davinci AEMIF is used we don't need to set timings and bus width.
It is done by AEMIF driver (drivers/memory/davinci-aemfi.c).
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@...com>
---
drivers/mtd/nand/davinci_nand.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index 4705214..879e915 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -742,27 +742,35 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
goto err_clk_enable;
}
+#if !IS_ENABLED(CONFIG_TI_DAVINCI_AEMIF)
/*
- * Setup Async configuration register in case we did not boot from
- * NAND and so bootloader did not bother to set it up.
+ * Setup Async configuration register in case we did not boot
+ * from NAND and so bootloader did not bother to set it up.
*/
- val = davinci_nand_readl(info, A1CR_OFFSET + info->core_chipsel * 4);
+ val = davinci_nand_readl(info, A1CR_OFFSET +
+ info->core_chipsel * 4);
- /* Extended Wait is not valid and Select Strobe mode is not used */
+ /*
+ * Extended Wait is not valid and Select Strobe mode is not
+ * used
+ */
val &= ~(ACR_ASIZE_MASK | ACR_EW_MASK | ACR_SS_MASK);
if (info->chip.options & NAND_BUSWIDTH_16)
val |= 0x1;
- davinci_nand_writel(info, A1CR_OFFSET + info->core_chipsel * 4, val);
+ davinci_nand_writel(info, A1CR_OFFSET +
+ info->core_chipsel * 4, val);
ret = 0;
if (info->timing)
- ret = davinci_aemif_setup_timing(info->timing, info->base,
- info->core_chipsel);
+ 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");
goto err;
}
+#endif
spin_lock_irq(&davinci_nand_lock);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists