diff options
Diffstat (limited to 'arch/arm/plat-samsung/dev-hsmmc2.c')
-rw-r--r-- | arch/arm/plat-samsung/dev-hsmmc2.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/dev-hsmmc2.c b/arch/arm/plat-samsung/dev-hsmmc2.c new file mode 100644 index 000000000000..824580bc0e06 --- /dev/null +++ b/arch/arm/plat-samsung/dev-hsmmc2.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-hsmmc2.c | ||
2 | * | ||
3 | * Copyright (c) 2009 Samsung Electronics | ||
4 | * Copyright (c) 2009 Maurus Cuelenaere | ||
5 | * | ||
6 | * Based on arch/arm/plat-s3c/dev-hsmmc1.c | ||
7 | * original file Copyright (c) 2008 Simtec Electronics | ||
8 | * | ||
9 | * S3C series device definition for hsmmc device 2 | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/mmc/host.h> | ||
19 | |||
20 | #include <mach/map.h> | ||
21 | #include <plat/sdhci.h> | ||
22 | #include <plat/devs.h> | ||
23 | |||
24 | #define S3C_SZ_HSMMC (0x1000) | ||
25 | |||
26 | static struct resource s3c_hsmmc2_resource[] = { | ||
27 | [0] = { | ||
28 | .start = S3C_PA_HSMMC2, | ||
29 | .end = S3C_PA_HSMMC2 + S3C_SZ_HSMMC - 1, | ||
30 | .flags = IORESOURCE_MEM, | ||
31 | }, | ||
32 | [1] = { | ||
33 | .start = IRQ_HSMMC2, | ||
34 | .end = IRQ_HSMMC2, | ||
35 | .flags = IORESOURCE_IRQ, | ||
36 | } | ||
37 | }; | ||
38 | |||
39 | static u64 s3c_device_hsmmc2_dmamask = 0xffffffffUL; | ||
40 | |||
41 | struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata = { | ||
42 | .max_width = 4, | ||
43 | .host_caps = (MMC_CAP_4_BIT_DATA | | ||
44 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | ||
45 | }; | ||
46 | |||
47 | struct platform_device s3c_device_hsmmc2 = { | ||
48 | .name = "s3c-sdhci", | ||
49 | .id = 2, | ||
50 | .num_resources = ARRAY_SIZE(s3c_hsmmc2_resource), | ||
51 | .resource = s3c_hsmmc2_resource, | ||
52 | .dev = { | ||
53 | .dma_mask = &s3c_device_hsmmc2_dmamask, | ||
54 | .coherent_dma_mask = 0xffffffffUL, | ||
55 | .platform_data = &s3c_hsmmc2_def_platdata, | ||
56 | }, | ||
57 | }; | ||
58 | |||
59 | void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd) | ||
60 | { | ||
61 | struct s3c_sdhci_platdata *set = &s3c_hsmmc2_def_platdata; | ||
62 | |||
63 | set->max_width = pd->max_width; | ||
64 | |||
65 | if (pd->cfg_gpio) | ||
66 | set->cfg_gpio = pd->cfg_gpio; | ||
67 | if (pd->cfg_card) | ||
68 | set->cfg_card = pd->cfg_card; | ||
69 | } | ||