board-flash.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 IS_ENABLED(CONFIG_MTD_NAND_OMAP2) || IS_ENABLED(CONFIG_MTD_ONENAND_OMAP2)
  24. extern void board_flash_init(struct flash_partitions [],
  25. char chip_sel[][GPMC_CS_NUM], int nand_type);
  26. #else
  27. static inline void board_flash_init(struct flash_partitions part[],
  28. char chip_sel[][GPMC_CS_NUM], int nand_type)
  29. {
  30. }
  31. #endif
  32. #if IS_ENABLED(CONFIG_MTD_NAND_OMAP2)
  33. extern void board_nand_init(struct mtd_partition *nand_parts,
  34. u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t);
  35. extern struct gpmc_timings nand_default_timings[];
  36. #else
  37. static inline void board_nand_init(struct mtd_partition *nand_parts,
  38. u8 nr_parts, u8 cs, int nand_type, struct gpmc_timings *gpmc_t)
  39. {
  40. }
  41. #define nand_default_timings NULL
  42. #endif
  43. #if IS_ENABLED(CONFIG_MTD_ONENAND_OMAP2)
  44. extern void board_onenand_init(struct mtd_partition *nand_parts,
  45. u8 nr_parts, u8 cs);
  46. #else
  47. static inline void board_onenand_init(struct mtd_partition *nand_parts,
  48. u8 nr_parts, u8 cs)
  49. {
  50. }
  51. #endif