Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Flash support for OMAP1 |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | */ |
| 8 | |
Tony Lindgren | 2e3ee9f | 2012-02-24 10:34:34 -0800 | [diff] [blame] | 9 | #include <linux/io.h> |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 10 | #include <linux/mtd/mtd.h> |
| 11 | #include <linux/mtd/map.h> |
| 12 | |
Tony Lindgren | 54b693d | 2012-10-02 13:39:28 -0700 | [diff] [blame] | 13 | #include <mach/tc.h> |
Arnd Bergmann | 100f963 | 2015-01-30 10:45:33 +0100 | [diff] [blame] | 14 | #include "flash.h" |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 15 | |
Tony Lindgren | 2c799ce | 2012-02-24 10:34:35 -0800 | [diff] [blame] | 16 | #include <mach/hardware.h> |
| 17 | |
Marc Zyngier | 667f390 | 2011-05-18 10:51:55 +0100 | [diff] [blame] | 18 | void omap1_set_vpp(struct platform_device *pdev, int enable) |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 19 | { |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 20 | u32 l; |
| 21 | |
Paul Parsons | 876fe76 | 2012-03-07 14:12:08 +0000 | [diff] [blame] | 22 | l = omap_readl(EMIFS_CONFIG); |
| 23 | if (enable) |
| 24 | l |= OMAP_EMIFS_CONFIG_WP; |
| 25 | else |
| 26 | l &= ~OMAP_EMIFS_CONFIG_WP; |
| 27 | omap_writel(l, EMIFS_CONFIG); |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 28 | } |