]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/mtd/nand/gpmi-nand/gpmi-lib.c
mtd: gpmi: imx6: fix the wrong method for checking ready/busy
[karo-tx-linux.git] / drivers / mtd / nand / gpmi-nand / gpmi-lib.c
index 7d56d87599c00c69aa3e611bacf99c09a9364370..aaced29727fb0437f6a0c142253b04cbc0ca82d0 100644 (file)
@@ -1079,6 +1079,13 @@ int gpmi_is_ready(struct gpmi_nand_data *this, unsigned chip)
                mask = MX23_BM_GPMI_DEBUG_READY0 << chip;
                reg = readl(r->gpmi_regs + HW_GPMI_DEBUG);
        } else if (GPMI_IS_MX28(this) || GPMI_IS_MX6Q(this)) {
+               /*
+                * In the imx6, all the ready/busy pins are bound
+                * together. So we only need to check chip 0.
+                */
+               if (GPMI_IS_MX6Q(this))
+                       chip = 0;
+
                /* MX28 shares the same R/B register as MX6Q. */
                mask = MX28_BF_GPMI_STAT_READY_BUSY(1 << chip);
                reg = readl(r->gpmi_regs + HW_GPMI_STAT);