diff options
author | Prabhakar Kushwaha <prabhakar@freescale.com> | 2012-11-08 03:12:59 -0500 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-11-16 03:57:39 -0500 |
commit | d6ba745d0a073a0f48053fa4744ab2e86c310aad (patch) | |
tree | 6ab2fea9ee603fbbe534fbd430eb55d091fcbf7a /drivers/mtd/nand | |
parent | 5d27aa5af04f58f3020de1c224dcf8a62151fd58 (diff) |
mtd: fsl_ifc_nand: wait tWB time, poll R/B before command execution
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>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/fsl_ifc_nand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index 3551a99076ba..53152310804c 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c | |||
@@ -389,7 +389,7 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command, | |||
389 | timing = IFC_FIR_OP_RBCD; | 389 | timing = IFC_FIR_OP_RBCD; |
390 | 390 | ||
391 | out_be32(&ifc->ifc_nand.nand_fir0, | 391 | out_be32(&ifc->ifc_nand.nand_fir0, |
392 | (IFC_FIR_OP_CMD0 << IFC_NAND_FIR0_OP0_SHIFT) | | 392 | (IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) | |
393 | (IFC_FIR_OP_UA << IFC_NAND_FIR0_OP1_SHIFT) | | 393 | (IFC_FIR_OP_UA << IFC_NAND_FIR0_OP1_SHIFT) | |
394 | (timing << IFC_NAND_FIR0_OP2_SHIFT)); | 394 | (timing << IFC_NAND_FIR0_OP2_SHIFT)); |
395 | out_be32(&ifc->ifc_nand.nand_fcr0, | 395 | out_be32(&ifc->ifc_nand.nand_fcr0, |
@@ -754,7 +754,7 @@ static void fsl_ifc_sram_init(struct fsl_ifc_mtd *priv) | |||
754 | 754 | ||
755 | /* READID */ | 755 | /* READID */ |
756 | out_be32(&ifc->ifc_nand.nand_fir0, | 756 | out_be32(&ifc->ifc_nand.nand_fir0, |
757 | (IFC_FIR_OP_CMD0 << IFC_NAND_FIR0_OP0_SHIFT) | | 757 | (IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) | |
758 | (IFC_FIR_OP_UA << IFC_NAND_FIR0_OP1_SHIFT) | | 758 | (IFC_FIR_OP_UA << IFC_NAND_FIR0_OP1_SHIFT) | |
759 | (IFC_FIR_OP_RB << IFC_NAND_FIR0_OP2_SHIFT)); | 759 | (IFC_FIR_OP_RB << IFC_NAND_FIR0_OP2_SHIFT)); |
760 | out_be32(&ifc->ifc_nand.nand_fcr0, | 760 | out_be32(&ifc->ifc_nand.nand_fcr0, |