atmel-mci.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef __ASM_AVR32_ATMEL_MCI_H
  2. #define __ASM_AVR32_ATMEL_MCI_H
  3. #define ATMEL_MCI_MAX_NR_SLOTS 2
  4. struct dma_slave;
  5. /**
  6. * struct mci_slot_pdata - board-specific per-slot configuration
  7. * @bus_width: Number of data lines wired up the slot
  8. * @detect_pin: GPIO pin wired to the card detect switch
  9. * @wp_pin: GPIO pin wired to the write protect sensor
  10. *
  11. * If a given slot is not present on the board, @bus_width should be
  12. * set to 0. The other fields are ignored in this case.
  13. *
  14. * Any pins that aren't available should be set to a negative value.
  15. *
  16. * Note that support for multiple slots is experimental -- some cards
  17. * might get upset if we don't get the clock management exactly right.
  18. * But in most cases, it should work just fine.
  19. */
  20. struct mci_slot_pdata {
  21. unsigned int bus_width;
  22. int detect_pin;
  23. int wp_pin;
  24. };
  25. /**
  26. * struct mci_platform_data - board-specific MMC/SDcard configuration
  27. * @dma_slave: DMA slave interface to use in data transfers, or NULL.
  28. * @slot: Per-slot configuration data.
  29. */
  30. struct mci_platform_data {
  31. struct dma_slave *dma_slave;
  32. struct mci_slot_pdata slot[ATMEL_MCI_MAX_NR_SLOTS];
  33. };
  34. #endif /* __ASM_AVR32_ATMEL_MCI_H */