summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-08-22 16:49:45 -0500
committerScott Wood <scottwood@freescale.com>2012-09-17 17:33:43 -0500
commite70bfa2986f9c028e3c21e0995285047a9baec27 (patch)
tree5379f528e5b17be0ac20932f9369a704cd5ab2ef /drivers
parent33b1d5cae3defdbeb30333ffac41bcbff85c5019 (diff)
downloadtalos-obmc-uboot-e70bfa2986f9c028e3c21e0995285047a9baec27.tar.gz
talos-obmc-uboot-e70bfa2986f9c028e3c21e0995285047a9baec27.zip
nand: Make NAND lock status compatible with Micron
Micron NAND flash (e.g. MT29F4G08ABADAH4) BLOCK LOCK READ STATUS is not the same as others. Instead of bit 1 being lock, it is #lock_tight. To make the driver support either format, ignore bit 1 and use only bit 0 and bit 2. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/nand_util.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index ffcb4f6ab9..c4752a7cbf 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/drivers/mtd/nand/nand_util.c
@@ -265,7 +265,6 @@ int nand_lock(struct mtd_info *mtd, int tight)
* >0 lock status:
* bitfield with the following combinations:
* NAND_LOCK_STATUS_TIGHT: page in tight state
- * NAND_LOCK_STATUS_LOCK: page locked
* NAND_LOCK_STATUS_UNLOCK: page unlocked
*
*/
@@ -294,7 +293,6 @@ int nand_get_lock_status(struct mtd_info *mtd, loff_t offset)
chip->cmdfunc(mtd, NAND_CMD_LOCK_STATUS, -1, page & chip->pagemask);
ret = chip->read_byte(mtd) & (NAND_LOCK_STATUS_TIGHT
- | NAND_LOCK_STATUS_LOCK
| NAND_LOCK_STATUS_UNLOCK);
out:
OpenPOWER on IntegriCloud