mmc-davinci.h 736 B

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