aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 12:13:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 12:13:19 -0400
commit636d17427b1ef0e97bd9df9b3b0e0f314ff889d3 (patch)
treef573602c1a78e9140c36e220c47675b79af1c270 /arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
parentdd21e9bdff14a9882f2c485fe533c6ce64ea2675 (diff)
parent0b019a41553a919965bb02d07d54e3e6c57a796d (diff)
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (226 commits) ARM: 6323/1: cam60: don't use __init for cam60_spi_{flash_platform_data,partitions} ARM: 6324/1: cam60: move cam60_spi_devices to .init.data ARM: 6322/1: imx/pca100: Fix name of spi platform data ARM: 6321/1: fix syntax error in main Kconfig file ARM: 6297/1: move U300 timer to dynamic clock lookup ARM: 6296/1: clock U300 intcon and timer properly ARM: 6295/1: fix U300 apb_pclk split ARM: 6306/1: fix inverted MMC card detect in U300 ARM: 6299/1: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID ARM: 6294/1: etm: do a dummy read from OSSRR during initialization ARM: 6292/1: coresight: add ETM management registers ARM: 6288/1: ftrace: document mcount formats ARM: 6287/1: ftrace: clean up mcount assembly indentation ARM: 6286/1: fix Thumb-2 decompressor broken by "Auto calculate ZRELADDR" ARM: 6281/1: video/imxfb.c: allow usage without BACKLIGHT_CLASS_DEVICE ARM: 6280/1: imx: Fix build failure when including <mach/gpio.h> without <linux/spinlock.h> ARM: S5PV210: Fix on missing s3c-sdhci card detection method for hsmmc3 ARM: S5P: Fix on missing S5P_DEV_FIMC in plat-s5p/Kconfig ARM: S5PV210: Override FIMC driver name on Aquila board ARM: S5PC100: enable FIMC on SMDKC100 ... Fix up conflicts in arch/arm/mach-{s5pc100,s5pv210}/cpu.c due to different subsystem 'setname' calls, and trivial port types in include/linux/serial_core.h
Diffstat (limited to 'arch/arm/mach-s3c64xx/setup-sdhci-gpio.c')
-rw-r--r--arch/arm/mach-s3c64xx/setup-sdhci-gpio.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
index a58c0cc7ba5..32235959137 100644
--- a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
+++ b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
@@ -16,12 +16,14 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/gpio.h>
19 20
20#include <mach/gpio.h>
21#include <plat/gpio-cfg.h> 21#include <plat/gpio-cfg.h>
22#include <plat/sdhci.h>
22 23
23void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) 24void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
24{ 25{
26 struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
25 unsigned int gpio; 27 unsigned int gpio;
26 unsigned int end; 28 unsigned int end;
27 29
@@ -33,12 +35,15 @@ void s3c64xx_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
33 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); 35 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
34 } 36 }
35 37
36 s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); 38 if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
37 s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2)); 39 s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
40 s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2));
41 }
38} 42}
39 43
40void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) 44void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
41{ 45{
46 struct s3c_sdhci_platdata *pdata = dev->dev.platform_data;
42 unsigned int gpio; 47 unsigned int gpio;
43 unsigned int end; 48 unsigned int end;
44 49
@@ -50,8 +55,10 @@ void s3c64xx_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
50 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); 55 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
51 } 56 }
52 57
53 s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); 58 if (pdata->cd_type == S3C_SDHCI_CD_INTERNAL) {
54 s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3)); 59 s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);
60 s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3));
61 }
55} 62}
56 63
57void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width) 64void s3c64xx_setup_sdhci2_cfg_gpio(struct platform_device *dev, int width)