diff options
author | Menon, Nishanth <nm@ti.com> | 2010-10-19 10:50:25 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-10-28 18:30:32 -0400 |
commit | bf56f0a6668cd399b5136d2216f24ec97f0ce716 (patch) | |
tree | e26b119e77d5a7940e5017a5352ed966c8f3a4bf /arch/arm/mach-omap2 | |
parent | 47dabaeedb4d6e841ac4d66ef249ce9c61303049 (diff) |
omap4: pandaboard: fix up mmc card detect logic
For MMC1 Controller, card detect interrupt source is
twl6030 which is non-gpio. The card detect call back function provides
card present/absent status by reading MMC Control register present
on twl6030. This functionality was introduced in mfd tree on
track to kernel.org
Sync pandaboard to the same and make mmc work.
Cc: Tony Lindgren <tony@atomide.com>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Tested-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 702f2a63f2c1..1ecd0a6cefb7 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -160,10 +160,19 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev) | |||
160 | struct platform_device, dev); | 160 | struct platform_device, dev); |
161 | struct omap_mmc_platform_data *pdata = dev->platform_data; | 161 | struct omap_mmc_platform_data *pdata = dev->platform_data; |
162 | 162 | ||
163 | if (!pdata) { | ||
164 | dev_err(dev, "%s: NULL platform data\n", __func__); | ||
165 | return -EINVAL; | ||
166 | } | ||
163 | /* Setting MMC1 Card detect Irq */ | 167 | /* Setting MMC1 Card detect Irq */ |
164 | if (pdev->id == 0) | 168 | if (pdev->id == 0) { |
165 | pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE + | 169 | ret = twl6030_mmc_card_detect_config(); |
166 | MMCDETECT_INTR_OFFSET; | 170 | if (ret) |
171 | dev_err(dev, "%s: Error card detect config(%d)\n", | ||
172 | __func__, ret); | ||
173 | else | ||
174 | pdata->slots[0].card_detect = twl6030_mmc_card_detect; | ||
175 | } | ||
167 | return ret; | 176 | return ret; |
168 | } | 177 | } |
169 | 178 | ||