]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/omap_nor.c
ARM: OMAP: unlock flash device during boot
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / omap_nor.c
index a0a12af08aa034db80cf10cafb742d456bacb925..d72cc114a38cdca1bd4dcd4d30d7e7a019f57871 100644 (file)
@@ -61,7 +61,7 @@ static void omap_set_vpp(struct map_info *map, int enable)
 {
        static int      count;
 
-       if (!cpu_is_omap24xx()) {
+       if (cpu_class_is_omap1()) {
                if (enable) {
                        if (count++ == 0)
                                OMAP_EMIFS_CONFIG_REG |= OMAP_EMIFS_CONFIG_WP;
@@ -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)