Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 2 | /* |
3 | * Flash support for OMAP1 | ||||
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 4 | */ |
5 | |||||
Tony Lindgren | 2e3ee9f | 2012-02-24 10:34:34 -0800 | [diff] [blame] | 6 | #include <linux/io.h> |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 7 | #include <linux/mtd/mtd.h> |
8 | #include <linux/mtd/map.h> | ||||
9 | |||||
Tony Lindgren | 54b693d | 2012-10-02 13:39:28 -0700 | [diff] [blame] | 10 | #include <mach/tc.h> |
Arnd Bergmann | 100f963 | 2015-01-30 10:45:33 +0100 | [diff] [blame] | 11 | #include "flash.h" |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 12 | |
Tony Lindgren | 2c799ce | 2012-02-24 10:34:35 -0800 | [diff] [blame] | 13 | #include <mach/hardware.h> |
14 | |||||
Marc Zyngier | 667f390 | 2011-05-18 10:51:55 +0100 | [diff] [blame] | 15 | void omap1_set_vpp(struct platform_device *pdev, int enable) |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 16 | { |
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 17 | u32 l; |
18 | |||||
Paul Parsons | 876fe76 | 2012-03-07 14:12:08 +0000 | [diff] [blame] | 19 | l = omap_readl(EMIFS_CONFIG); |
20 | if (enable) | ||||
21 | l |= OMAP_EMIFS_CONFIG_WP; | ||||
22 | else | ||||
23 | l &= ~OMAP_EMIFS_CONFIG_WP; | ||||
24 | omap_writel(l, EMIFS_CONFIG); | ||||
Ladislav Michl | 561b036 | 2010-02-15 10:03:32 -0800 | [diff] [blame] | 25 | } |