mmc.h 751 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Board-specific MMC configuration
  3. */
  4. #ifndef _DAVINCI_MMC_H
  5. #define _DAVINCI_MMC_H
  6. #include <linux/types.h>
  7. #include <linux/mmc/host.h>
  8. struct davinci_mmc_config {
  9. /* get_cd()/get_wp() may sleep */
  10. int (*get_cd)(int module);
  11. int (*get_ro)(int module);
  12. void (*set_power)(int module, bool on);
  13. /* wires == 0 is equivalent to wires == 4 (4-bit parallel) */
  14. u8 wires;
  15. u32 max_freq;
  16. /* any additional host capabilities: OR'd in to mmc->f_caps */
  17. u32 caps;
  18. /* Version of the MMC/SD controller */
  19. u8 version;
  20. /* Number of sg segments */
  21. u8 nr_sg;
  22. };
  23. void davinci_setup_mmc(int module, struct davinci_mmc_config *config);
  24. enum {
  25. MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */
  26. MMC_CTLR_VERSION_2, /* DA830 */
  27. };
  28. #endif