aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc.c
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2013-03-26 08:36:14 -0400
committerChris Ball <cjb@laptop.org>2013-04-04 10:08:37 -0400
commit4366dcc52a43746066e43c3eb8b3c5e0cca2e6f6 (patch)
tree7b7bdf457d8c1578b2d7c3e38d619ca5ef279089 /drivers/mmc/host/dw_mmc.c
parente065162ae476f55376ba06f9e80f41b28f769938 (diff)
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 <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r--drivers/mmc/host/dw_mmc.c6
1 files changed, 6 insertions, 0 deletions
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)
821 /* Power up slot */ 821 /* Power up slot */
822 if (slot->host->pdata->setpower) 822 if (slot->host->pdata->setpower)
823 slot->host->pdata->setpower(slot->id, mmc->ocr_avail); 823 slot->host->pdata->setpower(slot->id, mmc->ocr_avail);
824 regs = mci_readl(slot->host, PWREN);
825 regs |= (1 << slot->id);
826 mci_writel(slot->host, PWREN, regs);
824 break; 827 break;
825 case MMC_POWER_OFF: 828 case MMC_POWER_OFF:
826 /* Power down slot */ 829 /* Power down slot */
827 if (slot->host->pdata->setpower) 830 if (slot->host->pdata->setpower)
828 slot->host->pdata->setpower(slot->id, 0); 831 slot->host->pdata->setpower(slot->id, 0);
832 regs = mci_readl(slot->host, PWREN);
833 regs &= ~(1 << slot->id);
834 mci_writel(slot->host, PWREN, regs);
829 break; 835 break;
830 default: 836 default:
831 break; 837 break;