onenand.h 981 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 omap_onenand_platform_data {
  16. int cs;
  17. int gpio_irq;
  18. struct mtd_partition *parts;
  19. int nr_parts;
  20. int (*onenand_setup)(void __iomem *, int freq);
  21. int dma_channel;
  22. u8 flags;
  23. };
  24. #define ONENAND_MAX_PARTITIONS 8
  25. #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
  26. defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
  27. extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
  28. #else
  29. #define board_onenand_data NULL
  30. static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
  31. {
  32. }
  33. #endif