nand.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 <linux/mtd/partitions.h>
  11. enum nand_io {
  12. NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */
  13. NAND_OMAP_POLLED, /* polled mode, without prefetch */
  14. NAND_OMAP_PREFETCH_DMA /* prefetch enabled sDMA mode */
  15. };
  16. struct omap_nand_platform_data {
  17. unsigned int options;
  18. int cs;
  19. int gpio_irq;
  20. struct mtd_partition *parts;
  21. struct gpmc_timings *gpmc_t;
  22. int nr_parts;
  23. int (*nand_setup)(void);
  24. int (*dev_ready)(struct omap_nand_platform_data *);
  25. int dma_channel;
  26. enum nand_io xfer_type;
  27. unsigned long phys_base;
  28. int devsize;
  29. };
  30. /* minimum size for IO mapping */
  31. #define NAND_IO_SIZE 4
  32. #if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
  33. extern int gpmc_nand_init(struct omap_nand_platform_data *d);
  34. #else
  35. static inline int gpmc_nand_init(struct omap_nand_platform_data *d)
  36. {
  37. return 0;
  38. }
  39. #endif