diff options
author | San Mehat <san@google.com> | 2008-11-10 19:30:27 -0500 |
---|---|---|
committer | Daniel Walker <dwalker@codeaurora.org> | 2010-05-12 12:14:48 -0400 |
commit | 5d4f77ffefdcfbe9432db371126b74478964b4a0 (patch) | |
tree | d27164278d4668a3337ac79f47a36f0307eb2191 /arch/arm/mach-msm/devices.c | |
parent | c68af41d2dbfaa054e5dd15a4df699429ee8a0ad (diff) |
[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/arm/mach-msm/devices.c')
-rw-r--r-- | arch/arm/mach-msm/devices.c | 22 |
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 @@ | |||
24 | #include <linux/mtd/nand.h> | 24 | #include <linux/mtd/nand.h> |
25 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
26 | 26 | ||
27 | #include <mach/mmc.h> | ||
28 | |||
27 | static struct resource resources_uart1[] = { | 29 | static struct resource resources_uart1[] = { |
28 | { | 30 | { |
29 | .start = INT_UART1, | 31 | .start = INT_UART1, |
@@ -266,3 +268,23 @@ struct platform_device msm_device_sdc4 = { | |||
266 | .coherent_dma_mask = 0xffffffff, | 268 | .coherent_dma_mask = 0xffffffff, |
267 | }, | 269 | }, |
268 | }; | 270 | }; |
271 | |||
272 | static struct platform_device *msm_sdcc_devices[] __initdata = { | ||
273 | &msm_device_sdc1, | ||
274 | &msm_device_sdc2, | ||
275 | &msm_device_sdc3, | ||
276 | &msm_device_sdc4, | ||
277 | }; | ||
278 | |||
279 | int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat) | ||
280 | { | ||
281 | struct platform_device *pdev; | ||
282 | |||
283 | if (controller < 1 || controller > 4) | ||
284 | return -EINVAL; | ||
285 | |||
286 | pdev = msm_sdcc_devices[controller-1]; | ||
287 | pdev->dev.platform_data = plat; | ||
288 | return platform_device_register(pdev); | ||
289 | } | ||
290 | |||