Skip to content

Commit

Permalink
mmc: dw_mmc: remove duplicated buswidth code
Browse files Browse the repository at this point in the history
ctype is using 1-bit buswidth mode by default.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Jaehoon Chung authored and Chris Ball committed Dec 6, 2012
1 parent bf7cb22 commit b2f7cb4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/mmc/host/dw_mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,19 +773,16 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
const 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);
Expand Down

0 comments on commit b2f7cb4

Please sign in to comment.