onenand.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. u8 skip_initial_unlocking;
  32. };
  33. #define ONENAND_MAX_PARTITIONS 8
  34. #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
  35. defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
  36. extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
  37. #else
  38. #define board_onenand_data NULL
  39. static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
  40. {
  41. }
  42. #endif