diff options
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 1ffa52f7ab4a..0e365daad9cc 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
@@ -905,15 +905,15 @@ static void pmecc_enable(struct atmel_nand_host *host, int ecc_op) | |||
905 | { | 905 | { |
906 | u32 val; | 906 | u32 val; |
907 | 907 | ||
908 | pmecc_writel(host->ecc, CTRL, PMECC_CTRL_RST); | ||
909 | pmecc_writel(host->ecc, CTRL, PMECC_CTRL_DISABLE); | ||
910 | val = pmecc_readl_relaxed(host->ecc, CFG); | ||
911 | |||
912 | if (ecc_op != NAND_ECC_READ && ecc_op != NAND_ECC_WRITE) { | 908 | if (ecc_op != NAND_ECC_READ && ecc_op != NAND_ECC_WRITE) { |
913 | dev_err(host->dev, "atmel_nand: wrong pmecc operation type!"); | 909 | dev_err(host->dev, "atmel_nand: wrong pmecc operation type!"); |
914 | return; | 910 | return; |
915 | } | 911 | } |
916 | 912 | ||
913 | pmecc_writel(host->ecc, CTRL, PMECC_CTRL_RST); | ||
914 | pmecc_writel(host->ecc, CTRL, PMECC_CTRL_DISABLE); | ||
915 | val = pmecc_readl_relaxed(host->ecc, CFG); | ||
916 | |||
917 | if (ecc_op == NAND_ECC_READ) | 917 | if (ecc_op == NAND_ECC_READ) |
918 | pmecc_writel(host->ecc, CFG, (val & ~PMECC_CFG_WRITE_OP) | 918 | pmecc_writel(host->ecc, CFG, (val & ~PMECC_CFG_WRITE_OP) |
919 | | PMECC_CFG_AUTO_ENABLE); | 919 | | PMECC_CFG_AUTO_ENABLE); |