diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap1/flash.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/nor-simtec.c | 3 |
2 files changed, 6 insertions, 17 deletions
diff --git a/arch/arm/mach-omap1/flash.c b/arch/arm/mach-omap1/flash.c index 1749cb37dda0..4665bfcd2ce9 100644 --- a/arch/arm/mach-omap1/flash.c +++ b/arch/arm/mach-omap1/flash.c | |||
@@ -15,20 +15,12 @@ | |||
15 | 15 | ||
16 | void omap1_set_vpp(struct platform_device *pdev, int enable) | 16 | void omap1_set_vpp(struct platform_device *pdev, int enable) |
17 | { | 17 | { |
18 | static int count; | ||
19 | u32 l; | 18 | u32 l; |
20 | 19 | ||
21 | if (enable) { | 20 | l = omap_readl(EMIFS_CONFIG); |
22 | if (count++ == 0) { | 21 | if (enable) |
23 | l = omap_readl(EMIFS_CONFIG); | 22 | l |= OMAP_EMIFS_CONFIG_WP; |
24 | l |= OMAP_EMIFS_CONFIG_WP; | 23 | else |
25 | omap_writel(l, EMIFS_CONFIG); | 24 | l &= ~OMAP_EMIFS_CONFIG_WP; |
26 | } | 25 | omap_writel(l, EMIFS_CONFIG); |
27 | } else { | ||
28 | if (count && (--count == 0)) { | ||
29 | l = omap_readl(EMIFS_CONFIG); | ||
30 | l &= ~OMAP_EMIFS_CONFIG_WP; | ||
31 | omap_writel(l, EMIFS_CONFIG); | ||
32 | } | ||
33 | } | ||
34 | } | 26 | } |
diff --git a/arch/arm/mach-s3c2410/nor-simtec.c b/arch/arm/mach-s3c2410/nor-simtec.c index ad9f750f1e55..605aaccd0973 100644 --- a/arch/arm/mach-s3c2410/nor-simtec.c +++ b/arch/arm/mach-s3c2410/nor-simtec.c | |||
@@ -35,9 +35,7 @@ | |||
35 | static void simtec_nor_vpp(struct platform_device *pdev, int vpp) | 35 | static void simtec_nor_vpp(struct platform_device *pdev, int vpp) |
36 | { | 36 | { |
37 | unsigned int val; | 37 | unsigned int val; |
38 | unsigned long flags; | ||
39 | 38 | ||
40 | local_irq_save(flags); | ||
41 | val = __raw_readb(BAST_VA_CTRL3); | 39 | val = __raw_readb(BAST_VA_CTRL3); |
42 | 40 | ||
43 | printk(KERN_DEBUG "%s(%d)\n", __func__, vpp); | 41 | printk(KERN_DEBUG "%s(%d)\n", __func__, vpp); |
@@ -48,7 +46,6 @@ static void simtec_nor_vpp(struct platform_device *pdev, int vpp) | |||
48 | val &= ~BAST_CPLD_CTRL3_ROMWEN; | 46 | val &= ~BAST_CPLD_CTRL3_ROMWEN; |
49 | 47 | ||
50 | __raw_writeb(val, BAST_VA_CTRL3); | 48 | __raw_writeb(val, BAST_VA_CTRL3); |
51 | local_irq_restore(flags); | ||
52 | } | 49 | } |
53 | 50 | ||
54 | static struct physmap_flash_data simtec_nor_pdata = { | 51 | static struct physmap_flash_data simtec_nor_pdata = { |