aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300/mmc.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-09-21 11:03:13 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-21 11:03:13 -0400
commit59b69e27ca9f6c6347b1ec07066a9250140cb9e8 (patch)
treed8ea8948c92bdfc7f3bdfc03a7b789243ffbaaa8 /arch/arm/mach-u300/mmc.c
parent9c5e8fecc4a86adbf363f5cf344c0ccccdbb8982 (diff)
parentee2b805c8eb6459cf541ef141ff70dae17af59ca (diff)
Merge branch 'u300' into devel
Diffstat (limited to 'arch/arm/mach-u300/mmc.c')
-rw-r--r--arch/arm/mach-u300/mmc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c
index 089b9957b6a4..82af247760e6 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
26struct mmci_card_event { 27struct 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);
@@ -209,6 +211,20 @@ int __devinit mmc_init(struct amba_device *adev)
209 211
210 input_set_drvdata(mmci_card->mmc_input, mmci_card); 212 input_set_drvdata(mmci_card->mmc_input, mmci_card);
211 213
214 /*
215 * Setup padmuxing for MMC. Since this must always be
216 * compiled into the kernel, pmx is never released.
217 */
218 pmx = pmx_get(mmcsd_device, U300_APP_PMX_MMC_SETTING);
219
220 if (IS_ERR(pmx))
221 pr_warning("Could not get padmux handle\n");
222 else {
223 ret = pmx_activate(mmcsd_device, pmx);
224 if (IS_ERR_VALUE(ret))
225 pr_warning("Could not activate padmuxing\n");
226 }
227
212 ret = gpio_register_callback(U300_GPIO_PIN_MMC_CD, mmci_callback, 228 ret = gpio_register_callback(U300_GPIO_PIN_MMC_CD, mmci_callback,
213 mmci_card); 229 mmci_card);
214 230