diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 16:03:13 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-21 16:03:13 +0100 |
commit | 59b69e27ca9f6c6347b1ec07066a9250140cb9e8 (patch) | |
tree | d8ea8948c92bdfc7f3bdfc03a7b789243ffbaaa8 /arch/arm/mach-u300/mmc.c | |
parent | 9c5e8fecc4a86adbf363f5cf344c0ccccdbb8982 (diff) | |
parent | ee2b805c8eb6459cf541ef141ff70dae17af59ca (diff) | |
download | lwn-59b69e27ca9f6c6347b1ec07066a9250140cb9e8.tar.gz lwn-59b69e27ca9f6c6347b1ec07066a9250140cb9e8.zip |
Merge branch 'u300' into devel
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 089b9957b6a4..82af247760e6 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c @@ -22,6 +22,7 @@ #include <asm/mach/mmc.h> #include "mmc.h" +#include "padmux.h" struct mmci_card_event { struct input_dev *mmc_input; @@ -146,6 +147,7 @@ int __devinit mmc_init(struct amba_device *adev) { struct mmci_card_event *mmci_card; struct device *mmcsd_device = &adev->dev; + struct pmx *pmx; int ret = 0; mmci_card = kzalloc(sizeof(struct mmci_card_event), GFP_KERNEL); @@ -209,6 +211,20 @@ int __devinit mmc_init(struct amba_device *adev) input_set_drvdata(mmci_card->mmc_input, mmci_card); + /* + * Setup padmuxing for MMC. Since this must always be + * compiled into the kernel, pmx is never released. + */ + pmx = pmx_get(mmcsd_device, U300_APP_PMX_MMC_SETTING); + + if (IS_ERR(pmx)) + pr_warning("Could not get padmux handle\n"); + else { + ret = pmx_activate(mmcsd_device, pmx); + if (IS_ERR_VALUE(ret)) + pr_warning("Could not activate padmuxing\n"); + } + ret = gpio_register_callback(U300_GPIO_PIN_MMC_CD, mmci_callback, mmci_card); |