aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-u300/mmc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 17:06:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-24 17:06:51 -0700
commitd9fbd9a2cd5ac1b286a7d7cdb1a180ce1edaee2f (patch)
treec9a0859a8da4bdbf0df37507979a6f4cd94ebc8f /arch/arm/mach-u300/mmc.c
parentMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 (diff)
parentMerge branch 'origin' into for-linus (diff)
downloadlinux-dev-d9fbd9a2cd5ac1b286a7d7cdb1a180ce1edaee2f.tar.xz
linux-dev-d9fbd9a2cd5ac1b286a7d7cdb1a180ce1edaee2f.zip
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (103 commits) ARM: 5719/1: [AT91] Fix AC97 breakage ARM: 5721/1: MMCI enable the use of a regulator ARM: 5720/1: Move MMCI header to amba include dir ARM: 5718/1: Sane busids for RealView board components ARM: 5715/1: Make kprobes unregistration SMP safe ARM: 5711/1: locomo.c: CodingStyle cleanups ARM: 5710/1: at91: add AC97 support to at91sam9rl and at91sam9rlek board ARM: 5709/1: at91: add AC97 support to at91sam9g45 series and at91sam9m10g45ek board ARM: 5621/1: at91/dmaengine: integration of at_hdmac driver in at91sam9g45 series ARM: 5620/1: at91/dmaengine: integration of at_hdmac driver in at91sam9rl ARM: Add support for checking access permissions on prefetch aborts ARM: Separate out access error checking ARM: Ensure correct might_sleep() check in pagefault path ARM: Update page fault handling for new OOM techniques ARM: Provide definitions and helpers for decoding the FSR register ARM: 5712/1: SA1100: initialise spinlock in DMA code ARM: s3c: fix check of index into s3c_gpios[] ARM: spitz: fix touchscreen max presure ARM: STMP3xxx: deallocation with negative index of descriptors[] Thumb-2: Correctly handle undefined instructions in the kernel ...
Diffstat (limited to 'arch/arm/mach-u300/mmc.c')
-rw-r--r--arch/arm/mach-u300/mmc.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c
index 585cc013639d..7b6b016786bb 100644
--- a/arch/arm/mach-u300/mmc.c
+++ b/arch/arm/mach-u300/mmc.c
@@ -19,15 +19,16 @@
#include <linux/regulator/consumer.h>
#include <linux/regulator/machine.h>
#include <linux/gpio.h>
+#include <linux/amba/mmci.h>
-#include <asm/mach/mmc.h>
#include "mmc.h"
+#include "padmux.h"
struct mmci_card_event {
struct input_dev *mmc_input;
int mmc_inserted;
struct work_struct workq;
- struct mmc_platform_data mmc0_plat_data;
+ struct mmci_platform_data mmc0_plat_data;
};
static unsigned int mmc_status(struct device *dev)
@@ -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);
@@ -158,6 +160,8 @@ int __devinit mmc_init(struct amba_device *adev)
mmci_card->mmc0_plat_data.status = mmc_status;
mmci_card->mmc0_plat_data.gpio_wp = -1;
mmci_card->mmc0_plat_data.gpio_cd = -1;
+ mmci_card->mmc0_plat_data.capabilities = MMC_CAP_MMC_HIGHSPEED |
+ MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA;
mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data;
@@ -207,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);