mmc-mxcmmc.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef ASMARM_ARCH_MMC_H
  3. #define ASMARM_ARCH_MMC_H
  4. #include <linux/interrupt.h>
  5. #include <linux/mmc/host.h>
  6. struct device;
  7. /* board specific SDHC data, optional.
  8. * If not present, a writable card with 3,3V is assumed.
  9. */
  10. struct imxmmc_platform_data {
  11. /* Return values for the get_ro callback should be:
  12. * 0 for a read/write card
  13. * 1 for a read-only card
  14. * -ENOSYS when not supported (equal to NULL callback)
  15. * or a negative errno value when something bad happened
  16. */
  17. int (*get_ro)(struct device *);
  18. /* board specific hook to (de)initialize the SD slot.
  19. * The board code can call 'handler' on a card detection
  20. * change giving data as argument.
  21. */
  22. int (*init)(struct device *dev, irq_handler_t handler, void *data);
  23. void (*exit)(struct device *dev, void *data);
  24. /* available voltages. If not given, assume
  25. * MMC_VDD_32_33 | MMC_VDD_33_34
  26. */
  27. unsigned int ocr_avail;
  28. /* adjust slot voltage */
  29. void (*setpower)(struct device *, unsigned int vdd);
  30. /* enable card detect using DAT3 */
  31. int dat3_card_detect;
  32. };
  33. #endif