Skip to contentSkip to conversation

mmc: dw-mmc: control the power-enable register

PATCH In review Jaehoon Chung 4 participants 5 messages Mar 26, 2013 – Apr 5, 2013

Subsystems (2)
lore
Share & tools
lore

Jaehoon Chung

author maintainer
#0 lore raw

PATCH 1/1 mmc: dw-mmc: control the power-enable register

When card is power-on/off, need to control the power-enable register.

---
 drivers/mmc/host/dw_mmc.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/mmc/host/dw_mmc.c +6 -0
index a443820..a32aab5 100644
@@ -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;
Signature · 1 line
1.7.9.5
#3 lore raw

Hi,

Quoted 9 lines · Seungwon Jeon
Quoted 7 lines · James Hogan
Quoted 4 lines · Jaehoon Chung

When card is power-on/off, need to control the power-enable register.

Thanks, pushed to mmc-next for 3.10 after changing "dw-mmc" to "dw_mmc" in the commit subject line.

- Chris.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
author maintainer
#4 lore raw

Thanks Chris..

I will send the patch as "dw_mmc" in future.

Best Regards,
Jaehoon Chung

Quoted 18 lines · Chris Ball

Hi,

Quoted 9 lines · Seungwon Jeon
Quoted 7 lines · James Hogan
Quoted 4 lines · Jaehoon Chung

When card is power-on/off, need to control the power-enable register.

Thanks, pushed to mmc-next for 3.10 after changing "dw-mmc" to "dw_mmc" in the commit subject line.

- Chris.