public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw-mmc: control the power-enable register
@ 2013-03-26 12:36 Jaehoon Chung
  2013-03-27 14:47 ` James Hogan
  0 siblings, 1 reply; 5+ messages in thread
From: Jaehoon Chung @ 2013-03-26 12:36 UTC (permalink / raw)
  To: linux-mmc@vger.kernel.org
  Cc: 'Chris Ball', Seungwon Jeon, Kyungmin Park, Will Newton,
	James Hogan

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>
---
 drivers/mmc/host/dw_mmc.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index a443820..a32aab5 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;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: dw-mmc: control the power-enable register
  2013-03-26 12:36 [PATCH] mmc: dw-mmc: control the power-enable register Jaehoon Chung
@ 2013-03-27 14:47 ` James Hogan
  2013-04-04  5:47   ` Seungwon Jeon
  0 siblings, 1 reply; 5+ messages in thread
From: James Hogan @ 2013-03-27 14:47 UTC (permalink / raw)
  To: Jaehoon Chung
  Cc: linux-mmc@vger.kernel.org, 'Chris Ball', Seungwon Jeon,
	Kyungmin Park, Will Newton

On 26/03/13 12:36, Jaehoon Chung wrote:
> 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>

Cheers
James


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] mmc: dw-mmc: control the power-enable register
  2013-03-27 14:47 ` James Hogan
@ 2013-04-04  5:47   ` Seungwon Jeon
  2013-04-04 14:09     ` Chris Ball
  0 siblings, 1 reply; 5+ messages in thread
From: Seungwon Jeon @ 2013-04-04  5:47 UTC (permalink / raw)
  To: 'James Hogan', 'Jaehoon Chung'
  Cc: linux-mmc, 'Chris Ball', 'Kyungmin Park',
	'Will Newton'

On Wednesday, March 27, 2013, James Hogan wrote:
> On 26/03/13 12:36, Jaehoon Chung wrote:
> > 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>

Thanks,
Seungwon Jeon



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: dw-mmc: control the power-enable register
  2013-04-04  5:47   ` Seungwon Jeon
@ 2013-04-04 14:09     ` Chris Ball
  2013-04-05  3:27       ` Jaehoon Chung
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Ball @ 2013-04-04 14:09 UTC (permalink / raw)
  To: Seungwon Jeon
  Cc: 'James Hogan', 'Jaehoon Chung', linux-mmc,
	'Kyungmin Park', 'Will Newton'

Hi,

On Thu, Apr 04 2013, Seungwon Jeon wrote:
> On Wednesday, March 27, 2013, James Hogan wrote:
>> On 26/03/13 12:36, Jaehoon Chung wrote:
>> > 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>

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

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mmc: dw-mmc: control the power-enable register
  2013-04-04 14:09     ` Chris Ball
@ 2013-04-05  3:27       ` Jaehoon Chung
  0 siblings, 0 replies; 5+ messages in thread
From: Jaehoon Chung @ 2013-04-05  3:27 UTC (permalink / raw)
  To: Chris Ball
  Cc: Seungwon Jeon, 'James Hogan', linux-mmc,
	'Kyungmin Park', 'Will Newton'

Thanks Chris..

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

Best Regards,
Jaehoon Chung

On 04/04/2013 11:09 PM, Chris Ball wrote:
> Hi,
> 
> On Thu, Apr 04 2013, Seungwon Jeon wrote:
>> On Wednesday, March 27, 2013, James Hogan wrote:
>>> On 26/03/13 12:36, Jaehoon Chung wrote:
>>>> 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>
> 
> Thanks, pushed to mmc-next for 3.10 after changing "dw-mmc" to
> "dw_mmc" in the commit subject line.
> 
> - Chris.
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-05  3:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 12:36 [PATCH] mmc: dw-mmc: control the power-enable register Jaehoon Chung
2013-03-27 14:47 ` James Hogan
2013-04-04  5:47   ` Seungwon Jeon
2013-04-04 14:09     ` Chris Ball
2013-04-05  3:27       ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox