public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/03] mmc: A few trivial changes for tmio-mmc
@ 2009-11-27  4:59 Magnus Damm
  2009-11-27  5:00 ` [PATCH 01/03] mmc: Let tmio-mmc use dev_name() with request_irq() Magnus Damm
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Magnus Damm @ 2009-11-27  4:59 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-kernel, ian, lethal, philipp.zabel, pierre, Magnus Damm,
	akpm

mmc: A few trivial changes for tmio-mmc 

[PATCH 01/03] mmc: Let tmio-mmc use dev_name() with request_irq()
[PATCH 02/03] mmc: Remove const from tmio-mmc platform data V2
[PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls

These patches contain a few trivial changes for the tmio-mmc driver.
Nothing out of the ordinary. Tested together with the sh_mobile_sdhi
mfd driver on a sh7724 Ecovec board.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/mmc/host/tmio_mmc.c |   12 +++++++++---
 include/linux/mfd/tmio.h    |    2 +-
 2 files changed, 10 insertions(+), 4 deletions(-)

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

* [PATCH 01/03] mmc: Let tmio-mmc use dev_name() with request_irq()
  2009-11-27  4:59 [PATCH 00/03] mmc: A few trivial changes for tmio-mmc Magnus Damm
@ 2009-11-27  5:00 ` Magnus Damm
  2009-11-27  5:00 ` [PATCH 02/03] mmc: Remove const from tmio-mmc platform data V2 Magnus Damm
  2009-11-27  5:00 ` [PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls Magnus Damm
  2 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2009-11-27  5:00 UTC (permalink / raw)
  To: linux-mmc
  Cc: akpm, linux-kernel, ian, lethal, philipp.zabel, Magnus Damm,
	pierre

From: Magnus Damm <damm@opensource.se>

This change improves the /proc/interrupts output so the
irq number can be mapped to platform device on boards
with multiple tmio_mmc instances.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/mmc/host/tmio_mmc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 0001/drivers/mmc/host/tmio_mmc.c
+++ work/drivers/mmc/host/tmio_mmc.c	2009-11-26 18:58:08.000000000 +0900
@@ -582,7 +582,7 @@ static int __devinit tmio_mmc_probe(stru
 	disable_mmc_irqs(host, TMIO_MASK_ALL);
 
 	ret = request_irq(host->irq, tmio_mmc_irq, IRQF_DISABLED |
-		IRQF_TRIGGER_FALLING, "tmio-mmc", host);
+		IRQF_TRIGGER_FALLING, dev_name(&dev->dev), host);
 	if (ret)
 		goto unmap_ctl;
 

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

* [PATCH 02/03] mmc: Remove const from tmio-mmc platform data V2
  2009-11-27  4:59 [PATCH 00/03] mmc: A few trivial changes for tmio-mmc Magnus Damm
  2009-11-27  5:00 ` [PATCH 01/03] mmc: Let tmio-mmc use dev_name() with request_irq() Magnus Damm
@ 2009-11-27  5:00 ` Magnus Damm
  2009-11-27  5:00 ` [PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls Magnus Damm
  2 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2009-11-27  5:00 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-kernel, ian, lethal, philipp.zabel, pierre, akpm,
	Magnus Damm

From: Magnus Damm <damm@opensource.se>

This patch removes the const from the tmio-mmc
platform data parameter "hclk". Needed by the
SDHI driver.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 V2 drops the SDHI bits to simplify merging.

 include/linux/mfd/tmio.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 0001/include/linux/mfd/tmio.h
+++ work/include/linux/mfd/tmio.h	2009-11-26 19:02:59.000000000 +0900
@@ -60,7 +60,7 @@ void tmio_core_set_bus_shift(int bus_shi
  * data for the MMC controller
  */
 struct tmio_mmc_data {
-	const unsigned int		hclk;
+	unsigned int		hclk;
 	void (*set_pwr)(struct platform_device *host, int state);
 	void (*set_no_clk_div)(struct platform_device *host, int state);
 };

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

* [PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls
  2009-11-27  4:59 [PATCH 00/03] mmc: A few trivial changes for tmio-mmc Magnus Damm
  2009-11-27  5:00 ` [PATCH 01/03] mmc: Let tmio-mmc use dev_name() with request_irq() Magnus Damm
  2009-11-27  5:00 ` [PATCH 02/03] mmc: Remove const from tmio-mmc platform data V2 Magnus Damm
@ 2009-11-27  5:00 ` Magnus Damm
  2010-01-16  0:06   ` Andrew Morton
  2 siblings, 1 reply; 6+ messages in thread
From: Magnus Damm @ 2009-11-27  5:00 UTC (permalink / raw)
  To: linux-mmc
  Cc: Magnus Damm, linux-kernel, ian, lethal, philipp.zabel, akpm,
	pierre

From: Magnus Damm <damm@opensource.se>

This patch adds cell->disable() calls to the tmio-mmc
probe() error handling and the remove() function.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/mmc/host/tmio_mmc.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- 0016/drivers/mmc/host/tmio_mmc.c
+++ work/drivers/mmc/host/tmio_mmc.c	2009-11-26 19:10:14.000000000 +0900
@@ -577,14 +577,14 @@ static int __devinit tmio_mmc_probe(stru
 	if (ret >= 0)
 		host->irq = ret;
 	else
-		goto unmap_ctl;
+		goto cell_disable;
 
 	disable_mmc_irqs(host, TMIO_MASK_ALL);
 
 	ret = request_irq(host->irq, tmio_mmc_irq, IRQF_DISABLED |
 		IRQF_TRIGGER_FALLING, dev_name(&dev->dev), host);
 	if (ret)
-		goto unmap_ctl;
+		goto cell_disable;
 
 	mmc_add_host(mmc);
 
@@ -596,6 +596,9 @@ static int __devinit tmio_mmc_probe(stru
 
 	return 0;
 
+cell_disable:
+	if (cell->disable)
+		cell->disable(dev);
 unmap_ctl:
 	iounmap(host->ctl);
 host_free:
@@ -606,6 +609,7 @@ out:
 
 static int __devexit tmio_mmc_remove(struct platform_device *dev)
 {
+	struct mfd_cell	*cell = (struct mfd_cell *)dev->dev.platform_data;
 	struct mmc_host *mmc = platform_get_drvdata(dev);
 
 	platform_set_drvdata(dev, NULL);
@@ -614,6 +618,8 @@ static int __devexit tmio_mmc_remove(str
 		struct tmio_mmc_host *host = mmc_priv(mmc);
 		mmc_remove_host(mmc);
 		free_irq(host->irq, host);
+		if (cell->disable)
+			cell->disable(dev);
 		iounmap(host->ctl);
 		mmc_free_host(mmc);
 	}

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

* Re: [PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls
  2009-11-27  5:00 ` [PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls Magnus Damm
@ 2010-01-16  0:06   ` Andrew Morton
  2010-01-19 14:25     ` Magnus Damm
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2010-01-16  0:06 UTC (permalink / raw)
  To: Magnus Damm; +Cc: linux-mmc, linux-kernel, ian, lethal, philipp.zabel, pierre

On Fri, 27 Nov 2009 14:00:22 +0900
Magnus Damm <magnus.damm@gmail.com> wrote:

> From: Magnus Damm <damm@opensource.se>
> 
> This patch adds cell->disable() calls to the tmio-mmc
> probe() error handling and the remove() function.
> 

This patch still doesn't apply due to linux-next changes which never
got merged into 2.6.33-rcX.

If you think it should go into 2.6.33 then please redo a patch against
mainline and we'll cheerily trash the problematic stuff in linux-next.

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

* Re: [PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls
  2010-01-16  0:06   ` Andrew Morton
@ 2010-01-19 14:25     ` Magnus Damm
  0 siblings, 0 replies; 6+ messages in thread
From: Magnus Damm @ 2010-01-19 14:25 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mmc, linux-kernel, ian, lethal, philipp.zabel, pierre

On Sat, Jan 16, 2010 at 9:06 AM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Fri, 27 Nov 2009 14:00:22 +0900
> Magnus Damm <magnus.damm@gmail.com> wrote:
>
>> From: Magnus Damm <damm@opensource.se>
>>
>> This patch adds cell->disable() calls to the tmio-mmc
>> probe() error handling and the remove() function.
>>
>
> This patch still doesn't apply due to linux-next changes which never
> got merged into 2.6.33-rcX.

Good news is that the linux-next issue seems solved now thanks to help
from Samuel Ortiz.

> If you think it should go into 2.6.33 then please redo a patch against
> mainline and we'll cheerily trash the problematic stuff in linux-next.

Nah, this patch is not urgent. It may also break other platforms, so I
prefer to resend it later.

Thanks,

/ magnus

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

end of thread, other threads:[~2010-01-19 14:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27  4:59 [PATCH 00/03] mmc: A few trivial changes for tmio-mmc Magnus Damm
2009-11-27  5:00 ` [PATCH 01/03] mmc: Let tmio-mmc use dev_name() with request_irq() Magnus Damm
2009-11-27  5:00 ` [PATCH 02/03] mmc: Remove const from tmio-mmc platform data V2 Magnus Damm
2009-11-27  5:00 ` [PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls Magnus Damm
2010-01-16  0:06   ` Andrew Morton
2010-01-19 14:25     ` Magnus Damm

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