flash.c 585 B

1234567891011121314151617181920212223242526272829
  1. /*
  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. #include <linux/io.h>
  9. #include <linux/mtd/mtd.h>
  10. #include <linux/mtd/map.h>
  11. #include <mach/tc.h>
  12. #include "flash.h"
  13. #include <mach/hardware.h>
  14. void omap1_set_vpp(struct platform_device *pdev, int enable)
  15. {
  16. u32 l;
  17. l = omap_readl(EMIFS_CONFIG);
  18. if (enable)
  19. l |= OMAP_EMIFS_CONFIG_WP;
  20. else
  21. l &= ~OMAP_EMIFS_CONFIG_WP;
  22. omap_writel(l, EMIFS_CONFIG);
  23. }