board-flash.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * board-sdp.h
  3. *
  4. * Information structures for SDP-specific board config data
  5. *
  6. * Copyright (C) 2009 Nokia Corporation
  7. * Copyright (C) 2009 Texas Instruments
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #include <linux/mtd/mtd.h>
  14. #include <linux/mtd/partitions.h>
  15. #define PDC_NOR 1
  16. #define PDC_NAND 2
  17. #define PDC_ONENAND 3
  18. #define DBG_MPDB 4
  19. struct flash_partitions {
  20. struct mtd_partition *parts;
  21. int nr_parts;
  22. };
  23. #if defined(CONFIG_MTD_NAND_OMAP2) || \
  24. defined(CONFIG_MTD_NAND_OMAP2_MODULE) || \
  25. defined(CONFIG_MTD_ONENAND_OMAP2) || \
  26. defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
  27. extern void board_flash_init(struct flash_partitions [],
  28. char chip_sel[][GPMC_CS_NUM], int nand_type);
  29. #else
  30. static inline void board_flash_init(struct flash_partitions part[],
  31. char chip_sel[][GPMC_CS_NUM], int nand_type)
  32. {
  33. }
  34. #endif
  35. #if defined(CONFIG_MTD_NAND_OMAP2) || \
  36. defined(CONFIG_MTD_NAND_OMAP2_MODULE)
  37. extern void board_nand_init(struct mtd_partition *nand_parts,
  38. u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t);
  39. extern struct gpmc_timings nand_default_timings[];
  40. #else
  41. static inline void board_nand_init(struct mtd_partition *nand_parts,
  42. u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t)
  43. {
  44. }
  45. #define nand_default_timings NULL
  46. #endif
  47. #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
  48. defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
  49. extern void board_onenand_init(struct mtd_partition *nand_parts,
  50. u8 nr_parts, u8 cs);
  51. #else
  52. static inline void board_onenand_init(struct mtd_partition *nand_parts,
  53. u8 nr_parts, u8 cs)
  54. {
  55. }
  56. #endif