Linux 5.7.7
[linux/fpc-iii.git] / arch / arm / mach-omap1 / flash.c
blob40e43ce5329f55f2e691df5dd6e8fad99810aec9
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Flash support for OMAP1
4 */
6 #include <linux/io.h>
7 #include <linux/mtd/mtd.h>
8 #include <linux/mtd/map.h>
10 #include <mach/tc.h>
11 #include "flash.h"
13 #include <mach/hardware.h>
15 void omap1_set_vpp(struct platform_device *pdev, int enable)
17 u32 l;
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);