sdhci.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* linux/arch/arm/plat-pxa/include/plat/sdhci.h
  2. *
  3. * Copyright 2010 Marvell
  4. * Zhangfei Gao <zhangfei.gao@marvell.com>
  5. *
  6. * PXA Platform - SDHCI platform data definitions
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef __PLAT_PXA_SDHCI_H
  13. #define __PLAT_PXA_SDHCI_H
  14. /* pxa specific flag */
  15. /* Require clock free running */
  16. #define PXA_FLAG_ENABLE_CLOCK_GATING (1<<0)
  17. /* card always wired to host, like on-chip emmc */
  18. #define PXA_FLAG_CARD_PERMANENT (1<<1)
  19. /* Board design supports 8-bit data on SD/SDIO BUS */
  20. #define PXA_FLAG_SD_8_BIT_CAPABLE_SLOT (1<<2)
  21. /*
  22. * struct pxa_sdhci_platdata() - Platform device data for PXA SDHCI
  23. * @flags: flags for platform requirement
  24. * @clk_delay_cycles:
  25. * mmp2: each step is roughly 100ps, 5bits width
  26. * pxa910: each step is 1ns, 4bits width
  27. * @clk_delay_sel: select clk_delay, used on pxa910
  28. * 0: choose feedback clk
  29. * 1: choose feedback clk + delay value
  30. * 2: choose internal clk
  31. * @clk_delay_enable: enable clk_delay or not, used on pxa910
  32. * @ext_cd_gpio: gpio pin used for external CD line
  33. * @ext_cd_gpio_invert: invert values for external CD gpio line
  34. * @max_speed: the maximum speed supported
  35. * @host_caps: Standard MMC host capabilities bit field.
  36. * @quirks: quirks of platfrom
  37. * @pm_caps: pm_caps of platfrom
  38. */
  39. struct sdhci_pxa_platdata {
  40. unsigned int flags;
  41. unsigned int clk_delay_cycles;
  42. unsigned int clk_delay_sel;
  43. bool clk_delay_enable;
  44. unsigned int ext_cd_gpio;
  45. bool ext_cd_gpio_invert;
  46. unsigned int max_speed;
  47. unsigned int host_caps;
  48. unsigned int quirks;
  49. unsigned int pm_caps;
  50. };
  51. struct sdhci_pxa {
  52. u8 clk_enable;
  53. u8 power_mode;
  54. };
  55. #endif /* __PLAT_PXA_SDHCI_H */