Skip to contentSkip to conversation

mmc: dw-mmc: remove the duplicated code

PATCH In review Jaehoon Chung 5 participants 5 messages Nov 8, 2012 – Dec 3, 2012

Subsystems (2)
lore
Share & tools
lore

Jaehoon Chung

author maintainer
#0 lore raw

PATCH v3 2/4 mmc: dw-mmc: remove the duplicated code

ctype is used 1-bit buswidth mode by default.

---
 drivers/mmc/host/dw_mmc.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
drivers/mmc/host/dw_mmc.c +3 -6
index a1369aa..0a80b5c 100644
@@ -773,19 +773,16 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	struct dw_mci_drv_data *drv_data = slot->host->drv_data;
 	u32 regs;
 
-	/* set default 1 bit mode */
-	slot->ctype = SDMMC_CTYPE_1BIT;
-
 	switch (ios->bus_width) {
-	case MMC_BUS_WIDTH_1:
-		slot->ctype = SDMMC_CTYPE_1BIT;
-		break;
 	case MMC_BUS_WIDTH_4:
 		slot->ctype = SDMMC_CTYPE_4BIT;
 		break;
 	case MMC_BUS_WIDTH_8:
 		slot->ctype = SDMMC_CTYPE_8BIT;
 		break;
+	default:
+		/* set default 1 bit mode */
+		slot->ctype = SDMMC_CTYPE_1BIT;
 	}
 
 	regs = mci_readl(slot->host, UHS_REG);
Signature · 1 line
1.7.4.1
Acked-by on v3 2/4
#1 lore raw

This is minor change.

Thanks,
Seungwon Jeon

Quoted 41 lines · Jaehoon Chung

ctype is used 1-bit buswidth mode by default.

---
 drivers/mmc/host/dw_mmc.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
drivers/mmc/host/dw_mmc.c +3 -7
index a1369aa..0a80b5c 100644
@@ -773,19 +773,16 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	struct dw_mci_drv_data *drv_data = slot->host->drv_data;
 	u32 regs;
 
-	/* set default 1 bit mode */
-	slot->ctype = SDMMC_CTYPE_1BIT;
-
 	switch (ios->bus_width) {
-	case MMC_BUS_WIDTH_1:
-		slot->ctype = SDMMC_CTYPE_1BIT;
-		break;
 	case MMC_BUS_WIDTH_4:
 		slot->ctype = SDMMC_CTYPE_4BIT;
 		break;
 	case MMC_BUS_WIDTH_8:
 		slot->ctype = SDMMC_CTYPE_8BIT;
 		break;
+	default:
+		/* set default 1 bit mode */
+		slot->ctype = SDMMC_CTYPE_1BIT;
 	}
 
 	regs = mci_readl(slot->host, UHS_REG);
--

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

Acked-by
#2 lore raw
Quoted 6 lines · Seungwon Jeon

This is minor change.

Thanks,
Seungwon Jeon

Looks good to me too.

Quoted 44 lines · Jaehoon Chung
Quoted 41 lines

ctype is used 1-bit buswidth mode by default.

---
 drivers/mmc/host/dw_mmc.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
drivers/mmc/host/dw_mmc.c +3 -7
index a1369aa..0a80b5c 100644
@@ -773,19 +773,16 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	struct dw_mci_drv_data *drv_data = slot->host->drv_data;
 	u32 regs;
 
-	/* set default 1 bit mode */
-	slot->ctype = SDMMC_CTYPE_1BIT;
-
 	switch (ios->bus_width) {
-	case MMC_BUS_WIDTH_1:
-		slot->ctype = SDMMC_CTYPE_1BIT;
-		break;
 	case MMC_BUS_WIDTH_4:
 		slot->ctype = SDMMC_CTYPE_4BIT;
 		break;
 	case MMC_BUS_WIDTH_8:
 		slot->ctype = SDMMC_CTYPE_8BIT;
 		break;
+	default:
+		/* set default 1 bit mode */
+		slot->ctype = SDMMC_CTYPE_1BIT;
 	}
 
 	regs = mci_readl(slot->host, UHS_REG);
--

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

Acked-by Jaehoon Chung
#3 lore raw

2012/11/27 James Hogan <[email protected]>:

Quoted 60 lines · Seungwon Jeon
Quoted 6 lines

This is minor change.

Thanks,
Seungwon Jeon

Looks good to me too.

Quoted 36 lines · Jaehoon Chung
Quoted 34 lines

ctype is used 1-bit buswidth mode by default.

---
 drivers/mmc/host/dw_mmc.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
drivers/mmc/host/dw_mmc.c +3 -6
index a1369aa..0a80b5c 100644
@@ -773,19 +773,16 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
     struct dw_mci_drv_data *drv_data = slot->host->drv_data;
     u32 regs;
 
-    /* set default 1 bit mode */
-    slot->ctype = SDMMC_CTYPE_1BIT;
-
     switch (ios->bus_width) {
-    case MMC_BUS_WIDTH_1:
-            slot->ctype = SDMMC_CTYPE_1BIT;
-            break;
     case MMC_BUS_WIDTH_4:
             slot->ctype = SDMMC_CTYPE_4BIT;
             break;
     case MMC_BUS_WIDTH_8:
             slot->ctype = SDMMC_CTYPE_8BIT;
             break;
+    default:
+            /* set default 1 bit mode */
+            slot->ctype = SDMMC_CTYPE_1BIT;
     }
 
Quoted 8 lines
Quoted 7 lines
drivers/mmc/host/dw_mmc.c +0 -1
     regs = mci_readl(slot->host, UHS_REG);
--

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

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