Skip to contentSkip to conversation

mmc: dw_mmc: Add MSHC compatible for Exynos4412

PATCH Superseded Dongjin Kim 2 participants 4 messages Jan 23, 2013 – Jan 24, 2013

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: dw_mmc: Add MSHC compatible for Exynos4412

This patch adds the compatible string for MSHC controller of Exynos4412, and reuse the controller specific properties with Exynos5250 since those have same features.

---
 drivers/mmc/host/dw_mmc-exynos.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/host/dw_mmc-exynos.c +2 -0
index 0cb9bcb..4f7685f 100644
@@ -204,6 +204,8 @@ static const struct dw_mci_drv_data exynos5250_drv_data = {
 };
 
 static const struct of_device_id dw_mci_exynos_match[] = {
+	{ .compatible = "samsung,exynos4412-dw-mshc",
+			.data = &exynos5250_drv_data, },
 	{ .compatible = "samsung,exynos5250-dw-mshc",
 			.data = &exynos5250_drv_data, },
 	{},
Signature · 1 line
1.7.10.4
maintainer
#1 lore raw
Quoted 14 lines · Dongjin Kim

This patch adds the compatible string for MSHC controller of Exynos4412, and reuse the controller specific properties with Exynos5250 since those have same features.

---
 drivers/mmc/host/dw_mmc-exynos.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/host/dw_mmc-exynos.c +0 -0
index 0cb9bcb..4f7685f 100644

drivers/mmc/host/dw_mmc-exynos.c static const struct dw_mci_drv_data exynos5250_drv_data = { · line 208

Quoted 5 lines
drivers/mmc/host/dw_mmc-exynos.c +2 -0
@@ -204,6 +204,8 @@ static const struct dw_mci_drv_data exynos5250_drv_data = {
 };
 
 static const struct of_device_id dw_mci_exynos_match[] = {
+	{ .compatible = "samsung,exynos4412-dw-mshc",
+			.data = &exynos5250_drv_data, },

If we can use the same drv_data, should be changed to more generic name, not "exynos5250_".

Best Regards,
Jaehoon Chung

Quoted 4 lines
drivers/mmc/host/dw_mmc-exynos.c +0 -0
 	{ .compatible = "samsung,exynos5250-dw-mshc",
 			.data = &exynos5250_drv_data, },
 	{},
#2 lore raw

Hi Jaehoon,

Yes, completely agree with you but I wanted to keep "exynos5250_" before Exynos4210's drv_data is sorted out. Anyway "exynos5_" would be ok, I think.

Regards,
Dongjin.

Quoted 29 lines · Jaehoon Chung
Quoted 14 lines · Dongjin Kim

This patch adds the compatible string for MSHC controller of Exynos4412, and reuse the controller specific properties with Exynos5250 since those have same features.

---
 drivers/mmc/host/dw_mmc-exynos.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/host/dw_mmc-exynos.c +0 -0
index 0cb9bcb..4f7685f 100644

drivers/mmc/host/dw_mmc-exynos.c static const struct dw_mci_drv_data exynos5250_drv_data = { · line 208

Quoted 5 lines
drivers/mmc/host/dw_mmc-exynos.c +2 -0
@@ -204,6 +204,8 @@ static const struct dw_mci_drv_data exynos5250_drv_data = {
 };
 
 static const struct of_device_id dw_mci_exynos_match[] = {
+     { .compatible = "samsung,exynos4412-dw-mshc",
+                     .data = &exynos5250_drv_data, },

If we can use the same drv_data, should be changed to more generic name, not "exynos5250_".

Best Regards,
Jaehoon Chung

Quoted 4 lines
drivers/mmc/host/dw_mmc-exynos.c +0 -0
      { .compatible = "samsung,exynos5250-dw-mshc",
                      .data = &exynos5250_drv_data, },
      {},
#3 lore raw

PATCH v2 1/1 mmc: dw_mmc: Add MSHC compatible for Exynos4412

In reply to Dongjin Kim

This patch adds the compatible string for MSHC controller of Exynos4412, and share the controller specific properties with Exynos5250 since they have same features. Its driver data name is changed to exynos5_drv_data not to use SoC specific name.

---
 drivers/mmc/host/dw_mmc-exynos.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/mmc/host/dw_mmc-exynos.c +7 -5
index 4d50da6..8238a00 100644
@@ -199,8 +199,8 @@ static int dw_mci_exynos_setup_bus(struct dw_mci *host,
 	return 0;
 }
 
-/* Exynos5250 controller specific capabilities */
-static unsigned long exynos5250_dwmmc_caps[4] = {
+/* Exynos4412/Exynos5250 controller specific capabilities */
+static unsigned long exynos5_dwmmc_caps[4] = {
 	MMC_CAP_UHS_DDR50 | MMC_CAP_1_8V_DDR |
 		MMC_CAP_8_BIT_DATA | MMC_CAP_CMD23,
 	MMC_CAP_CMD23,
@@ -208,8 +208,8 @@ static unsigned long exynos5250_dwmmc_caps[4] = {
 	MMC_CAP_CMD23,
 };
 
-static const struct dw_mci_drv_data exynos5250_drv_data = {
-	.caps			= exynos5250_dwmmc_caps,
+static const struct dw_mci_drv_data exynos5_drv_data = {
+	.caps			= exynos5_dwmmc_caps,
 	.init			= dw_mci_exynos_priv_init,
 	.setup_clock		= dw_mci_exynos_setup_clock,
 	.prepare_command	= dw_mci_exynos_prepare_command,
@@ -219,8 +219,10 @@ static const struct dw_mci_drv_data exynos5250_drv_data = {
 };
 
 static const struct of_device_id dw_mci_exynos_match[] = {
+	{ .compatible = "samsung,exynos4412-dw-mshc",
+			.data = &exynos5_drv_data, },
 	{ .compatible = "samsung,exynos5250-dw-mshc",
-			.data = &exynos5250_drv_data, },
+			.data = &exynos5_drv_data, },
 	{},
 };
 MODULE_DEVICE_TABLE(of, dw_mci_exynos_match);
Signature · 1 line
1.7.10.4