summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand/onenand_base.c
diff options
context:
space:
mode:
authorRoman Tereshonkov <roman.tereshonkov@nokia.com>2011-02-17 12:44:41 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-03-11 15:22:47 +0100
commitb3dcfd35244e1cb8dc8dfa5c05013b133dbb437a (patch)
treeaf506e79393ddb05a8c8cc1a4271453442955ab8 /drivers/mtd/onenand/onenand_base.c
parentmtd: NOR flash driver for OMAP-L137/AM17x (diff)
downloadlinux-b3dcfd35244e1cb8dc8dfa5c05013b133dbb437a.tar.xz
linux-b3dcfd35244e1cb8dc8dfa5c05013b133dbb437a.zip
mtd: onenand: add new option to control initial onenand unlocking
A new option ONENAND_SKIP_INITIAL_UNLOCKING is added. This allows to disable initial onenand unlocking when the driver is initialized. Signed-off-by: Roman Tereshonkov <roman.tereshonkov@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/onenand/onenand_base.c')
-rw-r--r--drivers/mtd/onenand/onenand_base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 4205b9423b89..56a8b2005bda 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -4085,7 +4085,8 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
mtd->writebufsize = mtd->writesize;
/* Unlock whole block */
- this->unlock_all(mtd);
+ if (!(this->options & ONENAND_SKIP_INITIAL_UNLOCKING))
+ this->unlock_all(mtd);
ret = this->scan_bbt(mtd);
if ((!FLEXONENAND(this)) || ret)