aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c6410
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c6410')
-rw-r--r--arch/arm/mach-s3c6410/Kconfig1
-rw-r--r--arch/arm/mach-s3c6410/setup-sdhci.c34
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
17config S3C6410_SETUP_SDHCI 17config 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
38void 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
55void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev, 37void 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
87void 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}