From: Jaehoon Chung Date: Tue, 26 Mar 2013 12:36:14 +0000 (+0900) Subject: mmc: dw_mmc: control the power-enable register X-Git-Tag: v3.10-rc1~96^2~21 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=4366dcc52a43746066e43c3eb8b3c5e0cca2e6f6;p=linux.git mmc: dw_mmc: control the power-enable register When card is power-on/off, need to control the power-enable register. Signed-off-by: Jaehoon Chung Signed-off-by: Kyungmin Park Reviewed-by: James Hogan Acked-by: Seungwon Jeon Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 753c55c20c54..c6caedc2e847 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -821,11 +821,17 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) /* Power up slot */ if (slot->host->pdata->setpower) slot->host->pdata->setpower(slot->id, mmc->ocr_avail); + regs = mci_readl(slot->host, PWREN); + regs |= (1 << slot->id); + mci_writel(slot->host, PWREN, regs); break; case MMC_POWER_OFF: /* Power down slot */ if (slot->host->pdata->setpower) slot->host->pdata->setpower(slot->id, 0); + regs = mci_readl(slot->host, PWREN); + regs &= ~(1 << slot->id); + mci_writel(slot->host, PWREN, regs); break; default: break;