mmci.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * include/linux/amba/mmci.h
  3. */
  4. #ifndef AMBA_MMCI_H
  5. #define AMBA_MMCI_H
  6. #include <linux/mmc/host.h>
  7. #include <linux/mmc/card.h>
  8. #include <linux/mmc/sdio_func.h>
  9. struct embedded_sdio_data {
  10. struct sdio_cis cis;
  11. struct sdio_cccr cccr;
  12. struct sdio_embedded_func *funcs;
  13. int num_funcs;
  14. };
  15. /**
  16. * struct mmci_platform_data - platform configuration for the MMCI
  17. * (also known as PL180) block.
  18. * @ocr_mask: available voltages on the 4 pins from the block, this
  19. * is ignored if a regulator is used, see the MMC_VDD_* masks in
  20. * mmc/host.h
  21. * @ios_handler: a callback function to act on specfic ios changes,
  22. * used for example to control a levelshifter
  23. * mask into a value to be binary (or set some other custom bits
  24. * in MMCIPWR) or:ed and written into the MMCIPWR register of the
  25. * block. May also control external power based on the power_mode.
  26. * @status: if no GPIO read function was given to the block in
  27. * gpio_wp (below) this function will be called to determine
  28. * whether a card is present in the MMC slot or not
  29. * @gpio_wp: read this GPIO pin to see if the card is write protected
  30. * @gpio_cd: read this GPIO pin to detect card insertion
  31. * @cd_invert: true if the gpio_cd pin value is active low
  32. */
  33. struct mmci_platform_data {
  34. unsigned int ocr_mask;
  35. int (*ios_handler)(struct device *, struct mmc_ios *);
  36. unsigned int (*status)(struct device *);
  37. int gpio_wp;
  38. int gpio_cd;
  39. bool cd_invert;
  40. unsigned int status_irq;
  41. struct embedded_sdio_data *embedded_sdio;
  42. int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id);
  43. };
  44. #endif