diff options
Diffstat (limited to 'arch/arm/mach-u300/mmc.c')
-rw-r--r-- | arch/arm/mach-u300/mmc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c index 3138d3955c9e..e66284d73565 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/mach/mmc.h> | 23 | #include <asm/mach/mmc.h> |
24 | #include "mmc.h" | 24 | #include "mmc.h" |
25 | #include "padmux.h" | ||
25 | 26 | ||
26 | struct mmci_card_event { | 27 | struct mmci_card_event { |
27 | struct input_dev *mmc_input; | 28 | struct input_dev *mmc_input; |
@@ -146,6 +147,7 @@ int __devinit mmc_init(struct amba_device *adev) | |||
146 | { | 147 | { |
147 | struct mmci_card_event *mmci_card; | 148 | struct mmci_card_event *mmci_card; |
148 | struct device *mmcsd_device = &adev->dev; | 149 | struct device *mmcsd_device = &adev->dev; |
150 | struct pmx *pmx; | ||
149 | int ret = 0; | 151 | int ret = 0; |
150 | 152 | ||
151 | mmci_card = kzalloc(sizeof(struct mmci_card_event), GFP_KERNEL); | 153 | mmci_card = kzalloc(sizeof(struct mmci_card_event), GFP_KERNEL); |
@@ -205,6 +207,20 @@ int __devinit mmc_init(struct amba_device *adev) | |||
205 | 207 | ||
206 | input_set_drvdata(mmci_card->mmc_input, mmci_card); | 208 | input_set_drvdata(mmci_card->mmc_input, mmci_card); |
207 | 209 | ||
210 | /* | ||
211 | * Setup padmuxing for MMC. Since this must always be | ||
212 | * compiled into the kernel, pmx is never released. | ||
213 | */ | ||
214 | pmx = pmx_get(mmcsd_device, U300_APP_PMX_MMC_SETTING); | ||
215 | |||
216 | if (IS_ERR(pmx)) | ||
217 | pr_warning("Could not get padmux handle\n"); | ||
218 | else { | ||
219 | ret = pmx_activate(mmcsd_device, pmx); | ||
220 | if (IS_ERR_VALUE(ret)) | ||
221 | pr_warning("Could not activate padmuxing\n"); | ||
222 | } | ||
223 | |||
208 | ret = gpio_register_callback(U300_GPIO_PIN_MMC_CD, mmci_callback, | 224 | ret = gpio_register_callback(U300_GPIO_PIN_MMC_CD, mmci_callback, |
209 | mmci_card); | 225 | mmci_card); |
210 | 226 | ||