diff options
-rw-r--r-- | drivers/mtd/nand/fsl_ifc_nand.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index 9d1cf005878f..c96e1e0943f5 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c | |||
@@ -504,20 +504,29 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command, | |||
504 | if (mtd->writesize > 512) { | 504 | if (mtd->writesize > 512) { |
505 | nand_fcr0 = | 505 | nand_fcr0 = |
506 | (NAND_CMD_SEQIN << IFC_NAND_FCR0_CMD0_SHIFT) | | 506 | (NAND_CMD_SEQIN << IFC_NAND_FCR0_CMD0_SHIFT) | |
507 | (NAND_CMD_PAGEPROG << IFC_NAND_FCR0_CMD1_SHIFT); | 507 | (NAND_CMD_STATUS << IFC_NAND_FCR0_CMD1_SHIFT) | |
508 | (NAND_CMD_PAGEPROG << IFC_NAND_FCR0_CMD2_SHIFT); | ||
508 | 509 | ||
509 | iowrite32be( | 510 | iowrite32be( |
510 | (IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) | | 511 | (IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) | |
511 | (IFC_FIR_OP_CA0 << IFC_NAND_FIR0_OP1_SHIFT) | | 512 | (IFC_FIR_OP_CA0 << IFC_NAND_FIR0_OP1_SHIFT) | |
512 | (IFC_FIR_OP_RA0 << IFC_NAND_FIR0_OP2_SHIFT) | | 513 | (IFC_FIR_OP_RA0 << IFC_NAND_FIR0_OP2_SHIFT) | |
513 | (IFC_FIR_OP_WBCD << IFC_NAND_FIR0_OP3_SHIFT) | | 514 | (IFC_FIR_OP_WBCD << IFC_NAND_FIR0_OP3_SHIFT) | |
514 | (IFC_FIR_OP_CW1 << IFC_NAND_FIR0_OP4_SHIFT), | 515 | (IFC_FIR_OP_CMD2 << IFC_NAND_FIR0_OP4_SHIFT), |
515 | &ifc->ifc_nand.nand_fir0); | 516 | &ifc->ifc_nand.nand_fir0); |
517 | iowrite32be( | ||
518 | (IFC_FIR_OP_CW1 << IFC_NAND_FIR1_OP5_SHIFT) | | ||
519 | (IFC_FIR_OP_RDSTAT << | ||
520 | IFC_NAND_FIR1_OP6_SHIFT) | | ||
521 | (IFC_FIR_OP_NOP << IFC_NAND_FIR1_OP7_SHIFT), | ||
522 | &ifc->ifc_nand.nand_fir1); | ||
516 | } else { | 523 | } else { |
517 | nand_fcr0 = ((NAND_CMD_PAGEPROG << | 524 | nand_fcr0 = ((NAND_CMD_PAGEPROG << |
518 | IFC_NAND_FCR0_CMD1_SHIFT) | | 525 | IFC_NAND_FCR0_CMD1_SHIFT) | |
519 | (NAND_CMD_SEQIN << | 526 | (NAND_CMD_SEQIN << |
520 | IFC_NAND_FCR0_CMD2_SHIFT)); | 527 | IFC_NAND_FCR0_CMD2_SHIFT) | |
528 | (NAND_CMD_STATUS << | ||
529 | IFC_NAND_FCR0_CMD3_SHIFT)); | ||
521 | 530 | ||
522 | iowrite32be( | 531 | iowrite32be( |
523 | (IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) | | 532 | (IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) | |
@@ -526,8 +535,13 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command, | |||
526 | (IFC_FIR_OP_RA0 << IFC_NAND_FIR0_OP3_SHIFT) | | 535 | (IFC_FIR_OP_RA0 << IFC_NAND_FIR0_OP3_SHIFT) | |
527 | (IFC_FIR_OP_WBCD << IFC_NAND_FIR0_OP4_SHIFT), | 536 | (IFC_FIR_OP_WBCD << IFC_NAND_FIR0_OP4_SHIFT), |
528 | &ifc->ifc_nand.nand_fir0); | 537 | &ifc->ifc_nand.nand_fir0); |
529 | iowrite32be(IFC_FIR_OP_CW1 << IFC_NAND_FIR1_OP5_SHIFT, | 538 | iowrite32be( |
530 | &ifc->ifc_nand.nand_fir1); | 539 | (IFC_FIR_OP_CMD1 << IFC_NAND_FIR1_OP5_SHIFT) | |
540 | (IFC_FIR_OP_CW3 << IFC_NAND_FIR1_OP6_SHIFT) | | ||
541 | (IFC_FIR_OP_RDSTAT << | ||
542 | IFC_NAND_FIR1_OP7_SHIFT) | | ||
543 | (IFC_FIR_OP_NOP << IFC_NAND_FIR1_OP8_SHIFT), | ||
544 | &ifc->ifc_nand.nand_fir1); | ||
531 | 545 | ||
532 | if (column >= mtd->writesize) | 546 | if (column >= mtd->writesize) |
533 | nand_fcr0 |= | 547 | nand_fcr0 |= |