blob: 40e43ce5329f55f2e691df5dd6e8fad99810aec9 [file] [log] [blame]
David Brazdil0f672f62019-12-10 10:32:29 +00001// SPDX-License-Identifier: GPL-2.0-only
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00002/*
3 * Flash support for OMAP1
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004 */
5
6#include <linux/io.h>
7#include <linux/mtd/mtd.h>
8#include <linux/mtd/map.h>
9
10#include <mach/tc.h>
11#include "flash.h"
12
13#include <mach/hardware.h>
14
15void omap1_set_vpp(struct platform_device *pdev, int enable)
16{
17 u32 l;
18
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);
25}