mtd-nand-omap2.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * arch/arm/plat-omap/include/mach/nand.h
  3. *
  4. * Copyright (C) 2006 Micron Technology Inc.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <plat/gpmc.h>
  11. #include <linux/mtd/partitions.h>
  12. enum nand_io {
  13. NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */
  14. NAND_OMAP_POLLED, /* polled mode, without prefetch */
  15. NAND_OMAP_PREFETCH_DMA, /* prefetch enabled sDMA mode */
  16. NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */
  17. };
  18. struct omap_nand_platform_data {
  19. int cs;
  20. struct mtd_partition *parts;
  21. struct gpmc_timings *gpmc_t;
  22. int nr_parts;
  23. bool dev_ready;
  24. enum nand_io xfer_type;
  25. int devsize;
  26. enum omap_ecc ecc_opt;
  27. struct gpmc_nand_regs reg;
  28. };
  29. /* minimum size for IO mapping */
  30. #define NAND_IO_SIZE 4
  31. #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
  32. extern int gpmc_nand_init(struct omap_nand_platform_data *d);
  33. #else
  34. static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
  35. {
  36. return 0;
  37. }
  38. #endif