1561b036aSLadislav Michl /* 2561b036aSLadislav Michl * Flash support for OMAP1 3561b036aSLadislav Michl * 4561b036aSLadislav Michl * This program is free software; you can redistribute it and/or modify 5561b036aSLadislav Michl * it under the terms of the GNU General Public License version 2 as 6561b036aSLadislav Michl * published by the Free Software Foundation. 7561b036aSLadislav Michl */ 8561b036aSLadislav Michl 92e3ee9f4STony Lindgren #include <linux/io.h> 10561b036aSLadislav Michl #include <linux/mtd/mtd.h> 11561b036aSLadislav Michl #include <linux/mtd/map.h> 12561b036aSLadislav Michl 1354b693d4STony Lindgren #include <mach/tc.h> 14578fad4dSTony Lindgren #include <mach/flash.h> 15561b036aSLadislav Michl 162c799cefSTony Lindgren #include <mach/hardware.h> 172c799cefSTony Lindgren 18667f390bSMarc Zyngier void omap1_set_vpp(struct platform_device *pdev, int enable) 19561b036aSLadislav Michl { 20561b036aSLadislav Michl u32 l; 21561b036aSLadislav Michl 22561b036aSLadislav Michl l = omap_readl(EMIFS_CONFIG); 23876fe76dSPaul Parsons if (enable) 24561b036aSLadislav Michl l |= OMAP_EMIFS_CONFIG_WP; 25876fe76dSPaul Parsons else 26561b036aSLadislav Michl l &= ~OMAP_EMIFS_CONFIG_WP; 27561b036aSLadislav Michl omap_writel(l, EMIFS_CONFIG); 28561b036aSLadislav Michl } 29