blob: 99cda402e1e2279fcb1efae48a0f63c80c50be92 [file] [log] [blame]
Ladislav Michl561b0362010-02-15 10:03:32 -08001/*
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 Lindgren2e3ee9f2012-02-24 10:34:34 -08009#include <linux/io.h>
Ladislav Michl561b0362010-02-15 10:03:32 -080010#include <linux/mtd/mtd.h>
11#include <linux/mtd/map.h>
12
Tony Lindgren54b693d2012-10-02 13:39:28 -070013#include <mach/tc.h>
Arnd Bergmann100f9632015-01-30 10:45:33 +010014#include "flash.h"
Ladislav Michl561b0362010-02-15 10:03:32 -080015
Tony Lindgren2c799ce2012-02-24 10:34:35 -080016#include <mach/hardware.h>
17
Marc Zyngier667f3902011-05-18 10:51:55 +010018void omap1_set_vpp(struct platform_device *pdev, int enable)
Ladislav Michl561b0362010-02-15 10:03:32 -080019{
Ladislav Michl561b0362010-02-15 10:03:32 -080020 u32 l;
21
Paul Parsons876fe762012-03-07 14:12:08 +000022 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 Michl561b0362010-02-15 10:03:32 -080028}