diff options
author | Dmitry Lavnikevich <d.lavnikevich@sam-solutions.net> | 2013-10-25 13:05:33 +0300 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2014-05-14 14:13:29 -0400 |
commit | 58393ffbf836921bbd1a504a91e2c80a5f6f6651 (patch) | |
tree | 06dde63d2f83a74e46128c5b4e2a36afdccceff4 | |
parent | 2ef75d35c7c416d7b4db2ff1488e57ea800bcab1 (diff) |
nand: MX6Q uses only first R/B pin.
Unlike MX28 which have same R/B register, in MX6Q there is only one
actual R/B ping so if there are several nand chips connected they must
be using 0th R/B pin.
Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.net>
Signed-off-by: Christian Hemp <c.hemp@phytec.de>
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c index 5c8f3bc8bf85..099a53e27809 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c @@ -1261,10 +1261,17 @@ int gpmi_is_ready(struct gpmi_nand_data *this, unsigned chip) if (GPMI_IS_MX23(this)) { 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)) { + } else if (GPMI_IS_MX28(this)) { /* 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); + } else if (GPMI_IS_MX6Q(this)) { + /* MX6Q shares the same R/B register as MX28 except that there + * is only one actual R/B pin. This means that if there is + * several nand chips connected than they all must be using + * 0th R/B pin */ + mask = MX28_BF_GPMI_STAT_READY_BUSY(1); + reg = readl(r->gpmi_regs + HW_GPMI_STAT); } else pr_err("unknow arch.\n"); return reg & mask; |