Tony Lindgren | 90c62bf | 2008-12-10 17:37:17 -0800 | [diff] [blame] | 1 | /* |
| 2 | * MMC definitions for OMAP2 |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | */ |
| 8 | |
Grazvydas Ignotas | ed199f7 | 2010-08-10 18:01:52 -0700 | [diff] [blame] | 9 | struct mmc_card; |
| 10 | |
Adrian Hunter | 68ff042 | 2010-02-15 10:03:34 -0800 | [diff] [blame] | 11 | struct omap2_hsmmc_info { |
Tony Lindgren | 90c62bf | 2008-12-10 17:37:17 -0800 | [diff] [blame] | 12 | u8 mmc; /* controller 1/2/3 */ |
Sukumar Ghorai | 3a63833 | 2010-09-15 14:49:23 +0000 | [diff] [blame] | 13 | u32 caps; /* 4/8 wires and any additional host |
| 14 | * capabilities OR'd (ref. linux/mmc/host.h) */ |
David Brownell | 0329c37 | 2009-03-23 18:23:47 -0700 | [diff] [blame] | 15 | bool transceiver; /* MMC-2 option */ |
| 16 | bool ext_clock; /* use external pin for input clock */ |
Adrian Hunter | 8d75e98 | 2009-03-23 18:23:48 -0700 | [diff] [blame] | 17 | bool cover_only; /* No card detect - just cover switch */ |
Adrian Hunter | 23d99bb | 2009-09-22 16:44:48 -0700 | [diff] [blame] | 18 | bool nonremovable; /* Nonremovable e.g. eMMC */ |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 19 | bool deferred; /* mmc needs a deferred probe */ |
Tony Lindgren | 90c62bf | 2008-12-10 17:37:17 -0800 | [diff] [blame] | 20 | int gpio_cd; /* or -EINVAL */ |
| 21 | int gpio_wp; /* or -EINVAL */ |
Adrian Hunter | e51151a | 2009-03-23 18:23:48 -0700 | [diff] [blame] | 22 | char *name; /* or NULL for default */ |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 23 | struct platform_device *pdev; /* mmc controller instance */ |
David Brownell | b583f26 | 2009-05-28 14:04:03 -0700 | [diff] [blame] | 24 | int ocr_mask; /* temporary HACK */ |
Thomas Weber | 0b1974d | 2010-09-23 11:46:48 +0200 | [diff] [blame] | 25 | /* Remux (pad configuration) when powering on/off */ |
Andreas Fenkart | 80412ca | 2014-11-08 15:33:17 +0100 | [diff] [blame] | 26 | void (*remux)(struct device *dev, int power_on); |
Grazvydas Ignotas | ed199f7 | 2010-08-10 18:01:52 -0700 | [diff] [blame] | 27 | /* init some special card */ |
| 28 | void (*init_card)(struct mmc_card *card); |
Tony Lindgren | 90c62bf | 2008-12-10 17:37:17 -0800 | [diff] [blame] | 29 | }; |
| 30 | |
Javier Martinez Canillas | 502ad2a | 2016-08-11 15:29:45 -0400 | [diff] [blame^] | 31 | #if IS_ENABLED(CONFIG_MMC_OMAP_HS) |
Tony Lindgren | 90c62bf | 2008-12-10 17:37:17 -0800 | [diff] [blame] | 32 | |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 33 | void omap_hsmmc_init(struct omap2_hsmmc_info *); |
| 34 | void omap_hsmmc_late_init(struct omap2_hsmmc_info *); |
Tony Lindgren | 90c62bf | 2008-12-10 17:37:17 -0800 | [diff] [blame] | 35 | |
| 36 | #else |
| 37 | |
Tony Lindgren | 3b972bf | 2012-02-20 09:43:29 -0800 | [diff] [blame] | 38 | static inline void omap_hsmmc_init(struct omap2_hsmmc_info *info) |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | static inline void omap_hsmmc_late_init(struct omap2_hsmmc_info *info) |
Tony Lindgren | 90c62bf | 2008-12-10 17:37:17 -0800 | [diff] [blame] | 43 | { |
| 44 | } |
| 45 | |
| 46 | #endif |