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