diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-03-25 07:01:24 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-05-07 06:04:58 -0400 |
commit | 4faf6867638cc21aa43b4ca4ed0bdf14a2d29762 (patch) | |
tree | 1fed91079785469a6f044900bd322166df37adbf /arch/arm/mach-s3c6410 | |
parent | e074f9803227236252c8e7be16d836d709abff57 (diff) |
[ARM] S3C64XX: Add S3C6400 SDHCI setup support
Add support for S3C6400 SDHCI channels 0 and 1, making
the GPIO code common to both S3C6400 and S3C6410.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c6410')
-rw-r--r-- | arch/arm/mach-s3c6410/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c6410/setup-sdhci.c | 34 |
2 files changed, 1 insertions, 34 deletions
diff --git a/arch/arm/mach-s3c6410/Kconfig b/arch/arm/mach-s3c6410/Kconfig index 0c8df9797e55..4f7ffc7ce859 100644 --- a/arch/arm/mach-s3c6410/Kconfig +++ b/arch/arm/mach-s3c6410/Kconfig | |||
@@ -16,6 +16,7 @@ config CPU_S3C6410 | |||
16 | 16 | ||
17 | config S3C6410_SETUP_SDHCI | 17 | config S3C6410_SETUP_SDHCI |
18 | bool | 18 | bool |
19 | select S3C64XX_SETUP_SDHCI_GPIO | ||
19 | help | 20 | help |
20 | Internal helper functions for S3C6410 based SDHCI systems | 21 | Internal helper functions for S3C6410 based SDHCI systems |
21 | 22 | ||
diff --git a/arch/arm/mach-s3c6410/setup-sdhci.c b/arch/arm/mach-s3c6410/setup-sdhci.c index 0b5788bd5985..20666f3bd478 100644 --- a/arch/arm/mach-s3c6410/setup-sdhci.c +++ b/arch/arm/mach-s3c6410/setup-sdhci.c | |||
@@ -21,8 +21,6 @@ | |||
21 | #include <linux/mmc/card.h> | 21 | #include <linux/mmc/card.h> |
22 | #include <linux/mmc/host.h> | 22 | #include <linux/mmc/host.h> |
23 | 23 | ||
24 | #include <mach/gpio.h> | ||
25 | #include <plat/gpio-cfg.h> | ||
26 | #include <plat/regs-sdhci.h> | 24 | #include <plat/regs-sdhci.h> |
27 | #include <plat/sdhci.h> | 25 | #include <plat/sdhci.h> |
28 | 26 | ||
@@ -35,22 +33,6 @@ char *s3c6410_hsmmc_clksrcs[4] = { | |||
35 | /* [3] = "48m", - note not succesfully used yet */ | 33 | /* [3] = "48m", - note not succesfully used yet */ |
36 | }; | 34 | }; |
37 | 35 | ||
38 | void s3c6410_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | ||
39 | { | ||
40 | unsigned int gpio; | ||
41 | unsigned int end; | ||
42 | |||
43 | end = S3C64XX_GPG(2 + width); | ||
44 | |||
45 | /* Set all the necessary GPG pins to special-function 0 */ | ||
46 | for (gpio = S3C64XX_GPG(0); gpio < end; gpio++) { | ||
47 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
48 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
49 | } | ||
50 | |||
51 | s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); | ||
52 | s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2)); | ||
53 | } | ||
54 | 36 | ||
55 | void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev, | 37 | void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev, |
56 | void __iomem *r, | 38 | void __iomem *r, |
@@ -84,19 +66,3 @@ void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev, | |||
84 | writel(ctrl3, r + S3C_SDHCI_CONTROL3); | 66 | writel(ctrl3, r + S3C_SDHCI_CONTROL3); |
85 | } | 67 | } |
86 | 68 | ||
87 | void s3c6410_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | ||
88 | { | ||
89 | unsigned int gpio; | ||
90 | unsigned int end; | ||
91 | |||
92 | end = S3C64XX_GPH(2 + width); | ||
93 | |||
94 | /* Set all the necessary GPG pins to special-function 0 */ | ||
95 | for (gpio = S3C64XX_GPH(0); gpio < end; gpio++) { | ||
96 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
97 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
98 | } | ||
99 | |||
100 | s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); | ||
101 | s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3)); | ||
102 | } | ||