summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2008-11-10 16:30:27 -0800
committerDaniel Walker <dwalker@codeaurora.org>2010-05-12 09:14:48 -0700
commit5d4f77ffefdcfbe9432db371126b74478964b4a0 (patch)
treed27164278d4668a3337ac79f47a36f0307eb2191 /arch
parentc68af41d2dbfaa054e5dd15a4df699429ee8a0ad (diff)
downloadlinux-5d4f77ffefdcfbe9432db371126b74478964b4a0.tar.bz2
[ARM] msm: common: Add SDC device runtime registration
Signed-off-by: San Mehat <san@google.com> Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-msm/devices.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/devices.c b/arch/arm/mach-msm/devices.c
index 31b6b30e98bf..39bc474455c3 100644
--- a/arch/arm/mach-msm/devices.c
+++ b/arch/arm/mach-msm/devices.c
@@ -24,6 +24,8 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
+#include <mach/mmc.h>
+
static struct resource resources_uart1[] = {
{
.start = INT_UART1,
@@ -266,3 +268,23 @@ struct platform_device msm_device_sdc4 = {
.coherent_dma_mask = 0xffffffff,
},
};
+
+static struct platform_device *msm_sdcc_devices[] __initdata = {
+ &msm_device_sdc1,
+ &msm_device_sdc2,
+ &msm_device_sdc3,
+ &msm_device_sdc4,
+};
+
+int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
+{
+ struct platform_device *pdev;
+
+ if (controller < 1 || controller > 4)
+ return -EINVAL;
+
+ pdev = msm_sdcc_devices[controller-1];
+ pdev->dev.platform_data = plat;
+ return platform_device_register(pdev);
+}
+