From: Kevin Hilman Date: Wed, 17 Oct 2007 22:25:26 +0000 (-0700) Subject: ARM: OMAP: unlock flash device during boot X-Git-Tag: v2.6.24-omap1~252 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?p=linux-2.6-omap-h63xx.git;a=commitdiff_plain;h=a34c2f3a88498257a53630f023afe07d5e6dbdbc ARM: OMAP: unlock flash device during boot The bootloader may lock the flash device upon booting. This requires the use of 'flash_unlock' on each partition before using them. However, when booting from flash the MTD driver is unable to "mark space as dirty" since the device is locked. This results lots of boot warnings from the MTD layer. The MTD driver for OMAP needs to unlock the device during init so booting from flash can work without errors. Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren --- diff --git a/drivers/mtd/maps/omap_nor.c b/drivers/mtd/maps/omap_nor.c index a1342a2a1cb..d72cc114a38 100644 --- a/drivers/mtd/maps/omap_nor.c +++ b/drivers/mtd/maps/omap_nor.c @@ -108,6 +108,10 @@ static int __devinit omapflash_probe(struct platform_device *pdev) } info->mtd->owner = THIS_MODULE; + /* Unlock the flash device. */ + if (info->mtd->unlock) + info->mtd->unlock(info->mtd, 0, info->mtd->size); + #ifdef CONFIG_MTD_PARTITIONS err = parse_mtd_partitions(info->mtd, part_probes, &info->parts, 0); if (err > 0)