Skip to contentSkip to conversation

mmc: dw_mmc: Add more capabilities field

PATCH In review Seungwon Jeon 2 participants 2 messages Dec 9, 2011 – Dec 25, 2011

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

PATCH 1/1 mmc: dw_mmc: Add more capabilities field

This patch adds another capabilities field for MMC_CAPS2_XXX.

---
 drivers/mmc/host/dw_mmc.c  |    6 ++++++
 include/linux/mmc/dw_mmc.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)
drivers/mmc/host/dw_mmc.c +6 -0
index 3aaeb08..366df6b 100644
@@ -1681,6 +1681,12 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	else
 		mmc->caps = 0;
 
+	if (host->pdata->caps2)
+		mmc->caps2 = host->pdata->caps2;
+	else
+		mmc->caps2 = 0;
+
+
 	if (host->pdata->get_bus_wd)
 		if (host->pdata->get_bus_wd(slot->id) >= 4)
 			mmc->caps |= MMC_CAP_4_BIT_DATA;
include/linux/mmc/dw_mmc.h +1 -0
index 6dc9b80..e8779c6 100644
@@ -214,6 +214,7 @@ struct dw_mci_board {
 	unsigned int bus_hz; /* Bus speed */
 
 	unsigned int caps;	/* Capabilities */
+	unsigned int caps2;	/* More capabilities */
 	/*
 	 * Override fifo depth. If 0, autodetect it from the FIFOTH register,
 	 * but note that this may not be reliable after a bootloader has used
Signature · 1 line
1.7.0.4
#1 lore raw

Hi,

Quoted 13 lines · Seungwon Jeon

This patch adds another capabilities field for MMC_CAPS2_XXX.

---
 drivers/mmc/host/dw_mmc.c  |    6 ++++++
 include/linux/mmc/dw_mmc.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)
drivers/mmc/host/dw_mmc.c +0 -0
index 3aaeb08..366df6b 100644

drivers/mmc/host/dw_mmc.c static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id) · line 1689

Quoted 9 lines
drivers/mmc/host/dw_mmc.c +6 -0
@@ -1681,6 +1681,12 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 	else
 		mmc->caps = 0;
 
+	if (host->pdata->caps2)
+		mmc->caps2 = host->pdata->caps2;
+	else
+		mmc->caps2 = 0;
+
+

I think the else clause is unnecessary here (and above), so I'll suggest merging this patch to mmc-next for 3.3 and also adding:

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: dw_mmc: Remove unnecessary else clauses.

drivers/mmc/host/dw_mmc.c +0 -5
index 69e5889..9b839fa 100644
@@ -1678,14 +1678,9 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
 
 	if (host->pdata->caps)
 		mmc->caps = host->pdata->caps;
-	else
-		mmc->caps = 0;
 
 	if (host->pdata->caps2)
 		mmc->caps2 = host->pdata->caps2;
-	else
-		mmc->caps2 = 0;
-
 
 	if (host->pdata->get_bus_wd)
 		if (host->pdata->get_bus_wd(slot->id) >= 4)

Thanks,

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child