Skip to contentSkip to conversation

ARM: s3c64xx: mini6410: Correct card detect type for HSMMC1

PATCH Applied Tomasz Figa 3 participants 5 messages Sep 29, 2013 – Oct 20, 2013

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

PATCH 1/1 ARM: s3c64xx: mini6410: Correct card detect type for HSMMC1

According to board schematics, for HSMMC1 a GPIO line is used to detect card presence, while currently it is being configured for internal card detect line, which is multiplexed with card detect line of HSMMC0 and thus breaking it.

This patch adds proper sdhci platform data setting card detect type to external GPIO and fixing operation of HSMMC0.

---
 arch/arm/mach-s3c64xx/mach-mini6410.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/mach-s3c64xx/mach-mini6410.c +10 -0
index 58d46a3..97ae470 100644
@@ -36,7 +36,9 @@
 #include <plat/devs.h>
 #include <plat/fb.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
+#include <linux/platform_data/mmc-sdhci-s3c.h>
 #include <plat/regs-serial.h>
+#include <plat/sdhci.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
 #include <video/platform_lcd.h>
@@ -214,6 +216,13 @@ static struct platform_device mini6410_lcd_powerdev = {
 	.dev.platform_data	= &mini6410_lcd_power_data,
 };
 
+static struct s3c_sdhci_platdata mini6410_hsmmc1_pdata = {
+	.max_width		= 4,
+	.cd_type		= S3C_SDHCI_CD_GPIO,
+	.ext_cd_gpio		= S3C64XX_GPN(10),
+	.ext_cd_gpio_invert	= true,
+};
+
 static struct platform_device *mini6410_devices[] __initdata = {
 	&mini6410_device_eth,
 	&s3c_device_hsmmc0,
@@ -321,6 +330,7 @@ static void __init mini6410_machine_init(void)
 
 	s3c_nand_set_platdata(&mini6410_nand_info);
 	s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
+	s3c_sdhci1_set_platdata(&mini6410_hsmmc1_pdata);
 	s3c24xx_ts_set_platdata(NULL);
 
 	/* configure nCS1 width to 16 bits */
Signature · 1 line
1.8.3.2
#1 lore raw

Hi Kukjin,

Quoted 5 lines · On Sunday 29 of September 2013 18:12:01 Tomasz Figa wrote:

According to board schematics, for HSMMC1 a GPIO line is used to detect card presence, while currently it is being configured for internal card detect line, which is multiplexed with card detect line of HSMMC0 and thus breaking it.

Quoted 7 lines

This patch adds proper sdhci platform data setting card detect type to external GPIO and fixing operation of HSMMC0.

---
 arch/arm/mach-s3c64xx/mach-mini6410.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Would you mind taking this patch to your tree?

Best regards,
Tomasz

Quoted 36 lines
(quoted diff) +0 -0

b/arch/arm/mach-s3c64xx/mach-mini6410.c index 58d46a3..97ae470 100644

arch/arm/mach-s3c64xx/mach-mini6410.c +10 -0
@@ -36,7 +36,9 @@
 #include <plat/devs.h>
 #include <plat/fb.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
+#include <linux/platform_data/mmc-sdhci-s3c.h>
 #include <plat/regs-serial.h>
+#include <plat/sdhci.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
 #include <video/platform_lcd.h>
@@ -214,6 +216,13 @@ static struct platform_device mini6410_lcd_powerdev
 = { .dev.platform_data	= &mini6410_lcd_power_data,
 };
 
+static struct s3c_sdhci_platdata mini6410_hsmmc1_pdata = {
+	.max_width		= 4,
+	.cd_type		= S3C_SDHCI_CD_GPIO,
+	.ext_cd_gpio		= S3C64XX_GPN(10),
+	.ext_cd_gpio_invert	= true,
+};
+
 static struct platform_device *mini6410_devices[] __initdata = {
 	&mini6410_device_eth,
 	&s3c_device_hsmmc0,
@@ -321,6 +330,7 @@ static void __init mini6410_machine_init(void)
 
 	s3c_nand_set_platdata(&mini6410_nand_info);
 	s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
+	s3c_sdhci1_set_platdata(&mini6410_hsmmc1_pdata);
 	s3c24xx_ts_set_platdata(NULL);
 
 	/* configure nCS1 width to 16 bits */
Applied
#2 lore raw
Quoted 3 lines · Tomasz Figa

Hi Kukjin,

Hi,

Quoted 9 lines · On Sunday 29 of September 2013 18:12:01 Tomasz Figa wrote:
Quoted 8 lines

According to board schematics, for HSMMC1 a GPIO line is used to detect card presence, while currently it is being configured for internal card detect line, which is multiplexed with card detect line of HSMMC0 and thus breaking it.

This patch adds proper sdhci platform data setting card detect type to external GPIO and fixing operation of HSMMC0.

Quoted 7 lines
Quoted 4 lines
---
 arch/arm/mach-s3c64xx/mach-mini6410.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Would you mind taking this patch to your tree?

Applied, thanks.
Kukjin

Quoted 39 lines

Best regards,
Tomasz

Quoted 36 lines
(quoted diff) +0 -0

b/arch/arm/mach-s3c64xx/mach-mini6410.c index 58d46a3..97ae470 100644

arch/arm/mach-s3c64xx/mach-mini6410.c +10 -0
@@ -36,7 +36,9 @@
 #include <plat/devs.h>
 #include <plat/fb.h>
 #include <linux/platform_data/mtd-nand-s3c2410.h>
+#include <linux/platform_data/mmc-sdhci-s3c.h>
 #include <plat/regs-serial.h>
+#include <plat/sdhci.h>
 #include <linux/platform_data/touchscreen-s3c2410.h>
 
 #include <video/platform_lcd.h>
@@ -214,6 +216,13 @@ static struct platform_device mini6410_lcd_powerdev
 = { .dev.platform_data	= &mini6410_lcd_power_data,
 };
 
+static struct s3c_sdhci_platdata mini6410_hsmmc1_pdata = {
+	.max_width		= 4,
+	.cd_type		= S3C_SDHCI_CD_GPIO,
+	.ext_cd_gpio		= S3C64XX_GPN(10),
+	.ext_cd_gpio_invert	= true,
+};
+
 static struct platform_device *mini6410_devices[] __initdata = {
 	&mini6410_device_eth,
 	&s3c_device_hsmmc0,
@@ -321,6 +330,7 @@ static void __init mini6410_machine_init(void)
 
 	s3c_nand_set_platdata(&mini6410_nand_info);
 	s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
+	s3c_sdhci1_set_platdata(&mini6410_hsmmc1_pdata);
 	s3c24xx_ts_set_platdata(NULL);
 
 	/* configure nCS1 width to 16 bits */
#3 lore raw
Quoted 20 lines · Kukjin Kim
Quoted 3 lines · Tomasz Figa

Hi Kukjin,

Hi,

Quoted 14 lines · On Sunday 29 of September 2013 18:12:01 Tomasz Figa wrote:
Quoted 12 lines

According to board schematics, for HSMMC1 a GPIO line is used to detect card presence, while currently it is being configured for internal card detect line, which is multiplexed with card detect line of HSMMC0 and thus breaking it.

This patch adds proper sdhci platform data setting card detect type to external GPIO and fixing operation of HSMMC0.

---
  arch/arm/mach-s3c64xx/mach-mini6410.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
Quoted 5 lines
Quoted 2 lines

Would you mind taking this patch to your tree?

Applied, thanks.
Kukjin

Uhm...just small concern...it's possible to support dt for mini6410 but basic. I need to hold this on...

Quoted 39 lines
Quoted 39 lines

Best regards,
Tomasz

Quoted 36 lines
(quoted diff) +0 -0

b/arch/arm/mach-s3c64xx/mach-mini6410.c index 58d46a3..97ae470 100644

arch/arm/mach-s3c64xx/mach-mini6410.c +10 -0
@@ -36,7 +36,9 @@
  #include<plat/devs.h>
  #include<plat/fb.h>
  #include<linux/platform_data/mtd-nand-s3c2410.h>
+#include<linux/platform_data/mmc-sdhci-s3c.h>
  #include<plat/regs-serial.h>
+#include<plat/sdhci.h>
  #include<linux/platform_data/touchscreen-s3c2410.h>
 
  #include<video/platform_lcd.h>
@@ -214,6 +216,13 @@ static struct platform_device mini6410_lcd_powerdev
 = { .dev.platform_data	=&mini6410_lcd_power_data,
  };
 
+static struct s3c_sdhci_platdata mini6410_hsmmc1_pdata = {
+	.max_width		= 4,
+	.cd_type		= S3C_SDHCI_CD_GPIO,
+	.ext_cd_gpio		= S3C64XX_GPN(10),
+	.ext_cd_gpio_invert	= true,
+};
+
  static struct platform_device *mini6410_devices[] __initdata = {
  	&mini6410_device_eth,
  	&s3c_device_hsmmc0,
@@ -321,6 +330,7 @@ static void __init mini6410_machine_init(void)
 
  	s3c_nand_set_platdata(&mini6410_nand_info);
  	s3c_fb_set_platdata(&mini6410_lcd_pdata[features.lcd_index]);
+	s3c_sdhci1_set_platdata(&mini6410_hsmmc1_pdata);
  	s3c24xx_ts_set_platdata(NULL);
 
  	/* configure nCS1 width to 16 bits */
#4 lore raw

Hi Kukjin,

Quoted 24 lines · On Monday 21 of October 2013 07:01:00 Kukjin Kim wrote:
Quoted 23 lines · Kukjin Kim
Quoted 1 line · Tomasz Figa

Hi Kukjin,

Hi,

Quoted 18 lines · On Sunday 29 of September 2013 18:12:01 Tomasz Figa wrote:
Quoted 16 lines

According to board schematics, for HSMMC1 a GPIO line is used to detect
card presence, while currently it is being configured for internal card
detect line, which is multiplexed with card detect line of HSMMC0 and thus breaking it.

This patch adds proper sdhci platform data setting card detect type to
external GPIO and fixing operation of HSMMC0.

---

  arch/arm/mach-s3c64xx/mach-mini6410.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Would you mind taking this patch to your tree?

Applied, thanks.
Kukjin

Uhm...just small concern...it's possible to support dt for mini6410 but basic. I need to hold this on...

May I ask you to explain your concern about this?

I believe this bug fix is fine, since we still support board files for s3c64xx and DT based support is experimental at the moment.

Best regards,
Tomasz