linux/arch/arm/mach-omap1/flash.c
<<
>>
Prefs
   1// SPDX-License-Identifier: GPL-2.0-only
   2/*
   3 * Flash support for OMAP1
   4 */
   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}
  26