Skip to contentSkip to conversation

ARM: EXYNOS4: Fix card insert/removal event detection on smdkv310 board

PATCH In review Thomas Abraham 2 participants 3 messages May 16, 2011 – May 19, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: EXYNOS4: Fix card insert/removal event detection on smdkv310 board

On SMDKV310 board, a card detect gpio pin is available that is directly connected to the io pad of the sdhci controller. Fix incorrect value of cd_type field in platform data for sdhci instance 0 and 2.

---
 arch/arm/mach-exynos4/mach-smdkv310.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-exynos4/mach-smdkv310.c +2 -2
index 1526764..f6b1c7e 100644
@@ -78,7 +78,7 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = {
 };
 
 static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
-	.cd_type		= S3C_SDHCI_CD_GPIO,
+	.cd_type		= S3C_SDHCI_CD_INTERNAL,
 	.ext_cd_gpio		= EXYNOS4_GPK0(2),
 	.ext_cd_gpio_invert	= 1,
 	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
@@ -96,7 +96,7 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = {
 };
 
 static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
-	.cd_type		= S3C_SDHCI_CD_GPIO,
+	.cd_type		= S3C_SDHCI_CD_INTERNAL,
 	.ext_cd_gpio		= EXYNOS4_GPK2(2),
 	.ext_cd_gpio_invert	= 1,
 	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
Signature · 1 line
1.6.6.rc2
#1 lore raw

Hello,

Quoted 15 lines · Thomas Abraham

On SMDKV310 board, a card detect gpio pin is available that is directly connected to the io pad of the sdhci controller. Fix incorrect value of cd_type field in platform data for sdhci instance 0 and 2.

---
 arch/arm/mach-exynos4/mach-smdkv310.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-exynos4/mach-smdkv310.c +0 -0

exynos4/mach-smdkv310.c
index 1526764..f6b1c7e 100644

arch/arm/mach-exynos4/mach-smdkv310.c static struct s3c2410_uartcfg smdkv310_uartcfgs[] · line 84

Quoted 8 lines
arch/arm/mach-exynos4/mach-smdkv310.c +1 -1
@@ -78,7 +78,7 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[]
 __initdata = {
 };
 
 static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
-	.cd_type		= S3C_SDHCI_CD_GPIO,
+	.cd_type		= S3C_SDHCI_CD_INTERNAL,
 	.ext_cd_gpio		= EXYNOS4_GPK0(2),
 	.ext_cd_gpio_invert	= 1,

When you are changing the card detection type from GPIO to INTERNAL you should also remove 'ext_cd_gpio' and 'ext_cd_gpio_invert' definitions.

arch/arm/mach-exynos4/mach-smdkv310.c static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata · line 102

Quoted 10 lines
arch/arm/mach-exynos4/mach-smdkv310.c +1 -1
 	.clk_type		= S3C_SDHCI_CLK_DIV_EXTERNAL,
@@ -96,7 +96,7 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata
 __initdata = {
 };
 
 static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
-	.cd_type		= S3C_SDHCI_CD_GPIO,
+	.cd_type		= S3C_SDHCI_CD_INTERNAL,
 	.ext_cd_gpio		= EXYNOS4_GPK2(2),
 	.ext_cd_gpio_invert	= 1,

The same as with hsmmc0.

Quoted 2 lines

.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
--

Best regards

Signature · 2 lines
Marek Szyprowski
Samsung Poland R&D Center
#2 lore raw

Hi Marek,

Quoted 22 lines · Marek Szyprowski

Hello,

Quoted 18 lines · Thomas Abraham

On SMDKV310 board, a card detect gpio pin is available that is directly connected to the io pad of the sdhci controller. Fix incorrect value of cd_type field in platform data for sdhci instance 0 and 2.

---
 arch/arm/mach-exynos4/mach-smdkv310.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-exynos4/mach-smdkv310.c +0 -0

exynos4/mach-smdkv310.c
index 1526764..f6b1c7e 100644

arch/arm/mach-exynos4/mach-smdkv310.c +0 -0
@@ -78,7 +78,7 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[]
 __initdata = {
  };
 
Quoted 8 lines

arch/arm/mach-exynos4/mach-smdkv310.c static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = { · line 83

Quoted 5 lines
arch/arm/mach-exynos4/mach-smdkv310.c +1 -1
  static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
-     .cd_type                = S3C_SDHCI_CD_GPIO,
+     .cd_type                = S3C_SDHCI_CD_INTERNAL,
       .ext_cd_gpio            = EXYNOS4_GPK0(2),
       .ext_cd_gpio_invert     = 1,

When you are changing the card detection type from GPIO to INTERNAL you should also remove 'ext_cd_gpio' and 'ext_cd_gpio_invert' definitions.

Thanks for your comments. I will fix this and submit another patch.

Thomas.

Quoted 27 lines

arch/arm/mach-exynos4/mach-smdkv310.c static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata · line 102

Quoted 11 lines

      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,

arch/arm/mach-exynos4/mach-smdkv310.c +1 -1
@@ -96,7 +96,7 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata
 __initdata = {
  };
 
  static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
-     .cd_type                = S3C_SDHCI_CD_GPIO,
+     .cd_type                = S3C_SDHCI_CD_INTERNAL,
       .ext_cd_gpio            = EXYNOS4_GPK2(2),
       .ext_cd_gpio_invert     = 1,

The same as with hsmmc0.

Quoted 2 lines

      .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL, --

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html