diff options
author | Hyuk Lee <hyuk1.lee@samsung.com> | 2010-06-10 02:22:16 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-08-05 05:32:50 -0400 |
commit | b3c674bc7f3efdcfcd773566639fbf34ffcbefb7 (patch) | |
tree | bc07b3254c1a408374f6fbc96ebd6c9a3210c7d2 /arch | |
parent | 50e9769ad5cfdcfefcfdf99236a3c962e82ebc09 (diff) |
ARM: SAMSUNG: Add device definition for HSMMC3
This patch adds hsmmc3 device definition in plat-samsung. Because now
S5PV210 can support 4 hsmmc such as hsmmc0, hsmmc1, hsmmc2 and hsmmc3
and that can be used in further Samsung SoCs.
Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-samsung/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/plat-samsung/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/dev-hsmmc3.c | 72 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/devs.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/sdhci.h | 2 |
5 files changed, 81 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index 12c647cc46ea..15ef1e4026cf 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -160,6 +160,11 @@ config S3C_DEV_HSMMC2 | |||
160 | help | 160 | help |
161 | Compile in platform device definitions for HSMMC channel 2 | 161 | Compile in platform device definitions for HSMMC channel 2 |
162 | 162 | ||
163 | config S3C_DEV_HSMMC3 | ||
164 | bool | ||
165 | help | ||
166 | Compile in platform device definitions for HSMMC channel 3 | ||
167 | |||
163 | config S3C_DEV_HWMON | 168 | config S3C_DEV_HWMON |
164 | bool | 169 | bool |
165 | help | 170 | help |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index e7a975511b7c..75b91b43db49 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -35,6 +35,7 @@ obj-y += platformdata.o | |||
35 | obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o | 35 | obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o |
36 | obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o | 36 | obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o |
37 | obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o | 37 | obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o |
38 | obj-$(CONFIG_S3C_DEV_HSMMC3) += dev-hsmmc3.o | ||
38 | obj-$(CONFIG_S3C_DEV_HWMON) += dev-hwmon.o | 39 | obj-$(CONFIG_S3C_DEV_HWMON) += dev-hwmon.o |
39 | obj-y += dev-i2c0.o | 40 | obj-y += dev-i2c0.o |
40 | obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o | 41 | obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o |
diff --git a/arch/arm/plat-samsung/dev-hsmmc3.c b/arch/arm/plat-samsung/dev-hsmmc3.c new file mode 100644 index 000000000000..57bd394123cd --- /dev/null +++ b/arch/arm/plat-samsung/dev-hsmmc3.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* linux/arch/arm/plat-samsung/dev-hsmmc3.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Copyright (c) 2008 Simtec Electronics | ||
7 | * Ben Dooks <ben@simtec.co.uk> | ||
8 | * http://armlinux.simtec.co.uk/ | ||
9 | * | ||
10 | * Based on arch/arm/plat-samsung/dev-hsmmc1.c | ||
11 | * | ||
12 | * Samsung device definition for hsmmc device 3 | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License version 2 as | ||
16 | * published by the Free Software Foundation. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/mmc/host.h> | ||
22 | |||
23 | #include <mach/map.h> | ||
24 | #include <plat/sdhci.h> | ||
25 | #include <plat/devs.h> | ||
26 | |||
27 | #define S3C_SZ_HSMMC (0x1000) | ||
28 | |||
29 | static struct resource s3c_hsmmc3_resource[] = { | ||
30 | [0] = { | ||
31 | .start = S3C_PA_HSMMC3, | ||
32 | .end = S3C_PA_HSMMC3 + S3C_SZ_HSMMC - 1, | ||
33 | .flags = IORESOURCE_MEM, | ||
34 | }, | ||
35 | [1] = { | ||
36 | .start = IRQ_MMC3, | ||
37 | .end = IRQ_MMC3, | ||
38 | .flags = IORESOURCE_IRQ, | ||
39 | } | ||
40 | }; | ||
41 | |||
42 | static u64 s3c_device_hsmmc3_dmamask = 0xffffffffUL; | ||
43 | |||
44 | struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata = { | ||
45 | .max_width = 4, | ||
46 | .host_caps = (MMC_CAP_4_BIT_DATA | | ||
47 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | ||
48 | }; | ||
49 | |||
50 | struct platform_device s3c_device_hsmmc3 = { | ||
51 | .name = "s3c-sdhci", | ||
52 | .id = 3, | ||
53 | .num_resources = ARRAY_SIZE(s3c_hsmmc3_resource), | ||
54 | .resource = s3c_hsmmc3_resource, | ||
55 | .dev = { | ||
56 | .dma_mask = &s3c_device_hsmmc3_dmamask, | ||
57 | .coherent_dma_mask = 0xffffffffUL, | ||
58 | .platform_data = &s3c_hsmmc3_def_platdata, | ||
59 | }, | ||
60 | }; | ||
61 | |||
62 | void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd) | ||
63 | { | ||
64 | struct s3c_sdhci_platdata *set = &s3c_hsmmc3_def_platdata; | ||
65 | |||
66 | set->max_width = pd->max_width; | ||
67 | |||
68 | if (pd->cfg_gpio) | ||
69 | set->cfg_gpio = pd->cfg_gpio; | ||
70 | if (pd->cfg_card) | ||
71 | set->cfg_card = pd->cfg_card; | ||
72 | } | ||
diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index 4a661304e27f..097d0e458ab9 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h | |||
@@ -54,6 +54,7 @@ extern struct platform_device s3c_device_hwmon; | |||
54 | extern struct platform_device s3c_device_hsmmc0; | 54 | extern struct platform_device s3c_device_hsmmc0; |
55 | extern struct platform_device s3c_device_hsmmc1; | 55 | extern struct platform_device s3c_device_hsmmc1; |
56 | extern struct platform_device s3c_device_hsmmc2; | 56 | extern struct platform_device s3c_device_hsmmc2; |
57 | extern struct platform_device s3c_device_hsmmc3; | ||
57 | extern struct platform_device s3c_device_cfcon; | 58 | extern struct platform_device s3c_device_cfcon; |
58 | 59 | ||
59 | extern struct platform_device s3c_device_spi0; | 60 | extern struct platform_device s3c_device_spi0; |
diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-samsung/include/plat/sdhci.h index 016674fa20dd..3994a875473b 100644 --- a/arch/arm/plat-samsung/include/plat/sdhci.h +++ b/arch/arm/plat-samsung/include/plat/sdhci.h | |||
@@ -58,6 +58,7 @@ struct s3c_sdhci_platdata { | |||
58 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); | 58 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); |
59 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); | 59 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); |
60 | extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); | 60 | extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); |
61 | extern void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata *pd); | ||
61 | 62 | ||
62 | /* Default platform data, exported so that per-cpu initialisation can | 63 | /* Default platform data, exported so that per-cpu initialisation can |
63 | * set the correct one when there are more than one cpu type selected. | 64 | * set the correct one when there are more than one cpu type selected. |
@@ -66,6 +67,7 @@ extern void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata *pd); | |||
66 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; | 67 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; |
67 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; | 68 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; |
68 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; | 69 | extern struct s3c_sdhci_platdata s3c_hsmmc2_def_platdata; |
70 | extern struct s3c_sdhci_platdata s3c_hsmmc3_def_platdata; | ||
69 | 71 | ||
70 | /* Helper function availablity */ | 72 | /* Helper function availablity */ |
71 | 73 | ||