]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/omap_nor.c
ARM: OMAP: Change __REG access to omap/read write for traffic controller
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / omap_nor.c
index dca13a77f245440361d8450d16a129dacfd2a2b1..2e0a2770c157808bbab3e738827c1f5280996edc 100644 (file)
@@ -60,14 +60,21 @@ struct omapflash_info {
 static void omap_set_vpp(struct map_info *map, int enable)
 {
        static int      count;
+       u32 l;
 
        if (cpu_class_is_omap1()) {
                if (enable) {
-                       if (count++ == 0)
-                               OMAP_EMIFS_CONFIG_REG |= OMAP_EMIFS_CONFIG_WP;
+                       if (count++ == 0) {
+                               l = omap_readl(EMIFS_CONFIG);
+                               l |= OMAP_EMIFS_CONFIG_WP;
+                               omap_writel(l, EMIFS_CONFIG);
+                       }
                } else {
-                       if (count && (--count == 0))
-                               OMAP_EMIFS_CONFIG_REG &= ~OMAP_EMIFS_CONFIG_WP;
+                       if (count && (--count == 0)) {
+                               l = omap_readl(EMIFS_CONFIG);
+                               l &= ~OMAP_EMIFS_CONFIG_WP;
+                               omap_writel(l, EMIFS_CONFIG);
+                       }
                }
        }
 }