linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] driver/mtd/IFC:Wait tWB time, poll R/B before command execution
@ 2012-11-08  8:12 Prabhakar Kushwaha
  2012-11-16  8:45 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Prabhakar Kushwaha @ 2012-11-08  8:12 UTC (permalink / raw)
  To: linux-mtd, linuxppc-dev
  Cc: scottwood, Hemant Nautiyal, Prabhakar Kushwaha, dedekind1

IFC_FIR_OP_CMD0 issues command for execution without checking flash
readiness. It may cause problem if flash is not ready. Instead use
IFC_FIR_OP_CW0 which Wait for tWB time and poll R/B to return high or
time-out, before issuing command.

NAND_CMD_READID command implemention does not fulfill above requirement. So
update its programming.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Hemant Nautiyal <hemant.nautiyal@freescale.com>
---
 Based upon git://git.infradead.org/linux-mtd.git branch master

 drivers/mtd/nand/fsl_ifc_nand.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index 8f0dd13..7e5b17c 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -382,7 +382,7 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command,
 			timing = IFC_FIR_OP_RBCD;
 
 		out_be32(&ifc->ifc_nand.nand_fir0,
-				(IFC_FIR_OP_CMD0 << IFC_NAND_FIR0_OP0_SHIFT) |
+				(IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) |
 				(IFC_FIR_OP_UA  << IFC_NAND_FIR0_OP1_SHIFT) |
 				(timing << IFC_NAND_FIR0_OP2_SHIFT));
 		out_be32(&ifc->ifc_nand.nand_fcr0,
@@ -785,7 +785,7 @@ static void fsl_ifc_sram_init(struct fsl_ifc_mtd *priv)
 
 	/* READID */
 	out_be32(&ifc->ifc_nand.nand_fir0,
-			(IFC_FIR_OP_CMD0 << IFC_NAND_FIR0_OP0_SHIFT) |
+			(IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) |
 			(IFC_FIR_OP_UA  << IFC_NAND_FIR0_OP1_SHIFT) |
 			(IFC_FIR_OP_RB << IFC_NAND_FIR0_OP2_SHIFT));
 	out_be32(&ifc->ifc_nand.nand_fcr0,
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] driver/mtd/IFC:Wait tWB time, poll R/B before command execution
  2012-11-08  8:12 [PATCH] driver/mtd/IFC:Wait tWB time, poll R/B before command execution Prabhakar Kushwaha
@ 2012-11-16  8:45 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2012-11-16  8:45 UTC (permalink / raw)
  To: Prabhakar Kushwaha; +Cc: scottwood, linuxppc-dev, linux-mtd, Hemant Nautiyal

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

On Thu, 2012-11-08 at 13:42 +0530, Prabhakar Kushwaha wrote:
> IFC_FIR_OP_CMD0 issues command for execution without checking flash
> readiness. It may cause problem if flash is not ready. Instead use
> IFC_FIR_OP_CW0 which Wait for tWB time and poll R/B to return high or
> time-out, before issuing command.
> 
> NAND_CMD_READID command implemention does not fulfill above requirement. So
> update its programming.
> 
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> Signed-off-by: Hemant Nautiyal <hemant.nautiyal@freescale.com>

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-16  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08  8:12 [PATCH] driver/mtd/IFC:Wait tWB time, poll R/B before command execution Prabhakar Kushwaha
2012-11-16  8:45 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).