diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-10-31 12:14:38 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-12-15 18:39:34 -0500 |
commit | 5cc7fd88fc96072c333184ff359c818665ce2506 (patch) | |
tree | 5a91059f40729d6581bc477c0ef4421b681f42b7 /arch/arm/plat-s3c/dev-hsmmc.c | |
parent | ea522c7a54a1422b3ce8a1b9888f2108541ba047 (diff) |
[ARM] S3C6410: Add helper for setting SDHCI device information
Add the necessary helper functions for setting up the SDHCI
device information.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c/dev-hsmmc.c')
-rw-r--r-- | arch/arm/plat-s3c/dev-hsmmc.c | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/arch/arm/plat-s3c/dev-hsmmc.c b/arch/arm/plat-s3c/dev-hsmmc.c index 5a5ef74ebde3..4c05b39810e2 100644 --- a/arch/arm/plat-s3c/dev-hsmmc.c +++ b/arch/arm/plat-s3c/dev-hsmmc.c | |||
@@ -13,8 +13,10 @@ | |||
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/mmc/host.h> | ||
16 | 17 | ||
17 | #include <mach/map.h> | 18 | #include <mach/map.h> |
19 | #include <plat/sdhci.h> | ||
18 | #include <plat/devs.h> | 20 | #include <plat/devs.h> |
19 | #include <plat/cpu.h> | 21 | #include <plat/cpu.h> |
20 | 22 | ||
@@ -35,13 +37,32 @@ static struct resource s3c_hsmmc_resource[] = { | |||
35 | 37 | ||
36 | static u64 s3c_device_hsmmc_dmamask = 0xffffffffUL; | 38 | static u64 s3c_device_hsmmc_dmamask = 0xffffffffUL; |
37 | 39 | ||
40 | struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata = { | ||
41 | .max_width = 4, | ||
42 | .host_caps = (MMC_CAP_4_BIT_DATA | | ||
43 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | ||
44 | }; | ||
45 | |||
38 | struct platform_device s3c_device_hsmmc0 = { | 46 | struct platform_device s3c_device_hsmmc0 = { |
39 | .name = "s3c-sdhci", | 47 | .name = "s3c-sdhci", |
40 | .id = 0, | 48 | .id = 0, |
41 | .num_resources = ARRAY_SIZE(s3c_hsmmc_resource), | 49 | .num_resources = ARRAY_SIZE(s3c_hsmmc_resource), |
42 | .resource = s3c_hsmmc_resource, | 50 | .resource = s3c_hsmmc_resource, |
43 | .dev = { | 51 | .dev = { |
44 | .dma_mask = &s3c_device_hsmmc_dmamask, | 52 | .dma_mask = &s3c_device_hsmmc_dmamask, |
45 | .coherent_dma_mask = 0xffffffffUL | 53 | .coherent_dma_mask = 0xffffffffUL, |
46 | } | 54 | .platform_data = &s3c_hsmmc0_def_platdata, |
55 | }, | ||
47 | }; | 56 | }; |
57 | |||
58 | void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd) | ||
59 | { | ||
60 | struct s3c_sdhci_platdata *set = &s3c_hsmmc0_def_platdata; | ||
61 | |||
62 | set->max_width = pd->max_width; | ||
63 | |||
64 | if (pd->cfg_gpio) | ||
65 | set->cfg_gpio = pd->cfg_gpio; | ||
66 | if (pd->cfg_card) | ||
67 | set->cfg_card = pd->cfg_card; | ||
68 | } | ||