mtd: nand: gpmi: reset BCH earlier, too, to avoid NAND startup problems
[pandora-kernel.git] / drivers / mtd / nand / gpmi-nand / gpmi-lib.c
index 1585c5b..d84699c 100644 (file)
@@ -165,6 +165,15 @@ int gpmi_init(struct gpmi_nand_data *this)
        if (ret)
                goto err_out;
 
+       /*
+        * Reset BCH here, too. We got failures otherwise :(
+        * See later BCH reset for explanation of MX23 handling
+        */
+       ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MX23(this));
+       if (ret)
+               goto err_out;
+
+
        /* Choose NAND mode. */
        writel(BM_GPMI_CTRL1_GPMI_MODE, r->gpmi_regs + HW_GPMI_CTRL1_CLR);