mmc-esdhc-imx.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 2010 Wolfram Sang <w.sang@pengutronix.de>
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; version 2
  7. * of the License.
  8. */
  9. #ifndef __ASM_ARCH_IMX_ESDHC_H
  10. #define __ASM_ARCH_IMX_ESDHC_H
  11. #include <linux/types.h>
  12. enum wp_types {
  13. ESDHC_WP_NONE, /* no WP, neither controller nor gpio */
  14. ESDHC_WP_CONTROLLER, /* mmc controller internal WP */
  15. ESDHC_WP_GPIO, /* external gpio pin for WP */
  16. };
  17. enum cd_types {
  18. ESDHC_CD_NONE, /* no CD, neither controller nor gpio */
  19. ESDHC_CD_CONTROLLER, /* mmc controller internal CD */
  20. ESDHC_CD_GPIO, /* external gpio pin for CD */
  21. ESDHC_CD_PERMANENT, /* no CD, card permanently wired to host */
  22. };
  23. /**
  24. * struct esdhc_platform_data - platform data for esdhc on i.MX
  25. *
  26. * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35.
  27. *
  28. * @wp_gpio: gpio for write_protect
  29. * @cd_gpio: gpio for card_detect interrupt
  30. * @wp_type: type of write_protect method (see wp_types enum above)
  31. * @cd_type: type of card_detect method (see cd_types enum above)
  32. * @support_vsel: indicate it supports 1.8v switching
  33. */
  34. struct esdhc_platform_data {
  35. unsigned int wp_gpio;
  36. unsigned int cd_gpio;
  37. enum wp_types wp_type;
  38. enum cd_types cd_type;
  39. int max_bus_width;
  40. bool support_vsel;
  41. unsigned int delay_line;
  42. unsigned int tuning_step; /* The delay cell steps in tuning procedure */
  43. };
  44. #endif /* __ASM_ARCH_IMX_ESDHC_H */