Wolfram Sang | 203a073 | 2010-10-11 12:55:21 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2010 Wolfram Sang <w.sang@pengutronix.de> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; version 2 |
| 7 | * of the License. |
| 8 | */ |
| 9 | |
| 10 | #ifndef __ASM_ARCH_IMX_ESDHC_H |
| 11 | #define __ASM_ARCH_IMX_ESDHC_H |
| 12 | |
Dong Aisheng | ad93220 | 2013-09-13 19:11:35 +0800 | [diff] [blame] | 13 | #include <linux/types.h> |
| 14 | |
Shawn Guo | 913413c | 2011-06-21 22:41:51 +0800 | [diff] [blame] | 15 | enum wp_types { |
| 16 | ESDHC_WP_NONE, /* no WP, neither controller nor gpio */ |
| 17 | ESDHC_WP_CONTROLLER, /* mmc controller internal WP */ |
| 18 | ESDHC_WP_GPIO, /* external gpio pin for WP */ |
| 19 | }; |
| 20 | |
| 21 | enum cd_types { |
| 22 | ESDHC_CD_NONE, /* no CD, neither controller nor gpio */ |
| 23 | ESDHC_CD_CONTROLLER, /* mmc controller internal CD */ |
| 24 | ESDHC_CD_GPIO, /* external gpio pin for CD */ |
| 25 | ESDHC_CD_PERMANENT, /* no CD, card permanently wired to host */ |
| 26 | }; |
| 27 | |
Wolfram Sang | 0c6d49c | 2011-02-26 14:44:39 +0100 | [diff] [blame] | 28 | /** |
Shawn Guo | 913413c | 2011-06-21 22:41:51 +0800 | [diff] [blame] | 29 | * struct esdhc_platform_data - platform data for esdhc on i.MX |
Wolfram Sang | 0c6d49c | 2011-02-26 14:44:39 +0100 | [diff] [blame] | 30 | * |
Shawn Guo | 913413c | 2011-06-21 22:41:51 +0800 | [diff] [blame] | 31 | * ESDHC_WP(CD)_CONTROLLER type is not available on i.MX25/35. |
Wolfram Sang | 0c6d49c | 2011-02-26 14:44:39 +0100 | [diff] [blame] | 32 | * |
Shawn Guo | 913413c | 2011-06-21 22:41:51 +0800 | [diff] [blame] | 33 | * @wp_gpio: gpio for write_protect |
| 34 | * @cd_gpio: gpio for card_detect interrupt |
| 35 | * @wp_type: type of write_protect method (see wp_types enum above) |
| 36 | * @cd_type: type of card_detect method (see cd_types enum above) |
Dong Aisheng | ad93220 | 2013-09-13 19:11:35 +0800 | [diff] [blame] | 37 | * @support_vsel: indicate it supports 1.8v switching |
Wolfram Sang | 0c6d49c | 2011-02-26 14:44:39 +0100 | [diff] [blame] | 38 | */ |
| 39 | |
Wolfram Sang | 203a073 | 2010-10-11 12:55:21 +0200 | [diff] [blame] | 40 | struct esdhc_platform_data { |
Wolfram Sang | 0c6d49c | 2011-02-26 14:44:39 +0100 | [diff] [blame] | 41 | unsigned int wp_gpio; |
Wolfram Sang | 7e29c30 | 2011-02-26 14:44:41 +0100 | [diff] [blame] | 42 | unsigned int cd_gpio; |
Shawn Guo | 913413c | 2011-06-21 22:41:51 +0800 | [diff] [blame] | 43 | enum wp_types wp_type; |
| 44 | enum cd_types cd_type; |
Sascha Hauer | af51079 | 2013-01-21 19:02:28 +0800 | [diff] [blame] | 45 | int max_bus_width; |
Lucas Stach | 0ddf03c | 2013-06-05 15:13:26 +0200 | [diff] [blame] | 46 | unsigned int f_max; |
Dong Aisheng | ad93220 | 2013-09-13 19:11:35 +0800 | [diff] [blame] | 47 | bool support_vsel; |
Dong Aisheng | 602519b | 2013-10-18 19:48:47 +0800 | [diff] [blame] | 48 | unsigned int delay_line; |
Wolfram Sang | 203a073 | 2010-10-11 12:55:21 +0200 | [diff] [blame] | 49 | }; |
| 50 | #endif /* __ASM_ARCH_IMX_ESDHC_H */ |