mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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>
This commit is contained in:
parent
e065162ae4
commit
4366dcc52a
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue