onenand.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * arch/arm/plat-omap/include/mach/onenand.h
  3. *
  4. * Copyright (C) 2006 Nokia Corporation
  5. * Author: Juha Yrjola
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/mtd/mtd.h>
  12. #include <linux/mtd/partitions.h>
  13. #define ONENAND_SYNC_READ (1 << 0)
  14. #define ONENAND_SYNC_READWRITE (1 << 1)
  15. struct onenand_freq_info {
  16. u16 maf_id;
  17. u16 dev_id;
  18. u16 ver_id;
  19. };
  20. struct omap_onenand_platform_data {
  21. int cs;
  22. int gpio_irq;
  23. struct mtd_partition *parts;
  24. int nr_parts;
  25. int (*onenand_setup)(void __iomem *, int *freq_ptr);
  26. int (*get_freq)(const struct onenand_freq_info *freq_info,
  27. bool *clk_dep);
  28. int dma_channel;
  29. u8 flags;
  30. u8 regulator_can_sleep;
  31. };
  32. #define ONENAND_MAX_PARTITIONS 8
  33. #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
  34. defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
  35. extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
  36. #else
  37. #define board_onenand_data NULL
  38. static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
  39. {
  40. }
  41. #endif