summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/onenand
diff options
context:
space:
mode:
authorRoman Tereshonkov <roman.tereshonkov@nokia.com>2011-02-17 13:44:42 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-03-11 14:22:47 +0000
commitc93ff6bf16523d33e991a1fadde1b8d63eb7cd2c (patch)
tree79274e999ebb76ba73ece6d5fde44fb6594c2505 /drivers/mtd/onenand
parentb3dcfd35244e1cb8dc8dfa5c05013b133dbb437a (diff)
downloadlinux-c93ff6bf16523d33e991a1fadde1b8d63eb7cd2c.tar.gz
linux-c93ff6bf16523d33e991a1fadde1b8d63eb7cd2c.tar.bz2
linux-c93ff6bf16523d33e991a1fadde1b8d63eb7cd2c.zip
mtd: omap: add new variable to platform data to control onenand unlocking
New variable skip_initial_unlocking is added to the omap_onenand_platform_data. This is used to inform the onenand driver to skip onenand unlocking when it 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')
-rw-r--r--drivers/mtd/onenand/omap2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index c849cacf4b2f..ea32c2fc4622 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -631,6 +631,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
{
struct omap_onenand_platform_data *pdata;
struct omap2_onenand *c;
+ struct onenand_chip *this;
int r;
pdata = pdev->dev.platform_data;
@@ -728,9 +729,8 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
c->mtd.dev.parent = &pdev->dev;
+ this = &c->onenand;
if (c->dma_channel >= 0) {
- struct onenand_chip *this = &c->onenand;
-
this->wait = omap2_onenand_wait;
if (cpu_is_omap34xx()) {
this->read_bufferram = omap3_onenand_read_bufferram;
@@ -751,6 +751,9 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
c->onenand.disable = omap2_onenand_disable;
}
+ if (pdata->skip_initial_unlocking)
+ this->options |= ONENAND_SKIP_INITIAL_UNLOCKING;
+
if ((r = onenand_scan(&c->mtd, 1)) < 0)
goto err_release_regulator;