Kevin Hilman | 2dbf56ae | 2009-05-11 15:55:03 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Board-specific MMC configuration |
| 3 | */ |
| 4 | |
| 5 | #ifndef _DAVINCI_MMC_H |
| 6 | #define _DAVINCI_MMC_H |
| 7 | |
| 8 | #include <linux/types.h> |
| 9 | #include <linux/mmc/host.h> |
| 10 | |
| 11 | struct davinci_mmc_config { |
| 12 | /* get_cd()/get_wp() may sleep */ |
| 13 | int (*get_cd)(int module); |
| 14 | int (*get_ro)(int module); |
Ido Yariv | 4a9de8a | 2011-07-28 20:49:09 +0000 | [diff] [blame] | 15 | |
| 16 | void (*set_power)(int module, bool on); |
| 17 | |
Kevin Hilman | 2dbf56ae | 2009-05-11 15:55:03 -0700 | [diff] [blame] | 18 | /* wires == 0 is equivalent to wires == 4 (4-bit parallel) */ |
| 19 | u8 wires; |
| 20 | |
| 21 | u32 max_freq; |
| 22 | |
| 23 | /* any additional host capabilities: OR'd in to mmc->f_caps */ |
| 24 | u32 caps; |
| 25 | |
| 26 | /* Version of the MMC/SD controller */ |
| 27 | u8 version; |
Sudhakar Rajashekhara | ca2afb6 | 2010-05-26 14:41:49 -0700 | [diff] [blame] | 28 | |
| 29 | /* Number of sg segments */ |
| 30 | u8 nr_sg; |
Kevin Hilman | 2dbf56ae | 2009-05-11 15:55:03 -0700 | [diff] [blame] | 31 | }; |
| 32 | void davinci_setup_mmc(int module, struct davinci_mmc_config *config); |
| 33 | |
| 34 | enum { |
| 35 | MMC_CTLR_VERSION_1 = 0, /* DM644x and DM355 */ |
| 36 | MMC_CTLR_VERSION_2, /* DA830 */ |
| 37 | }; |
| 38 | |
| 39 | #endif |