* [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes
@ 2010-02-17 7:37 Magnus Damm
2010-02-17 7:37 ` [PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled Magnus Damm
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Magnus Damm @ 2010-02-17 7:37 UTC (permalink / raw)
To: linux-mmc
Cc: sameo, linux-sh, linus.ml.walleij, g.liakhovetski, goda.yusuke,
ian, lethal, Magnus Damm, akpm
tmio_mmc: SDHI hotplug and random fixes
[PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled
[PATCH 02/05] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2
[PATCH 03/05] tmio_mmc: Use 100ms mmc_detect_change() delay
[PATCH 04/05] tmio_mmc: Remove const from platform data V3
[PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls
These patches are a collection of fixes for SDHI hotplug and
other minor improvements for the tmio_mmc driver.
The first and the third patch contain tmio-mmc specific fixes
for SDHI hotplug. Hot insertion and eject have been tested using
the sh-2.6 tree with the two SDHI blocks provided by the sh7724
processor using Ecovec24 and ms7724se boards. The single SDHI
block included in sh7722 has been tested on Migo-R.
The second patch is the ground work to allow the SDHI mfd driver
to enable MMC_CAP_MMC_HIGHSPEED.
The last two patches are just random improvements and fixes for
the tmio_mmc driver.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/mmc/host/tmio_mmc.c | 13 ++++++++++---
drivers/mmc/host/tmio_mmc.h | 6 ++----
include/linux/mfd/tmio.h | 3 ++-
3 files changed, 14 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled
2010-02-17 7:37 [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Magnus Damm
@ 2010-02-17 7:37 ` Magnus Damm
2010-02-17 7:37 ` [PATCH 02/05] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2 Magnus Damm
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2010-02-17 7:37 UTC (permalink / raw)
To: linux-mmc
Cc: sameo, linux-sh, linus.ml.walleij, akpm, goda.yusuke, ian, lethal,
Magnus Damm, g.liakhovetski
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
On SuperH platforms the SDHI controller does not produce any command IRQs after
a completed IO. This leads to card-detect interrupts staying disabled. Do not
disable card-detect interrupts on DATA IRQs.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Magnus Damm <damm@opensource.se>
---
Previously posted by Guennadi to linux-mmc 20100216 as
"[PATCH] tmio_mmc: keep card-detect interrupts enabled"
drivers/mmc/host/tmio_mmc.h | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index 692dc23..dafecfb 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -55,10 +55,8 @@
/* Define some IRQ masks */
/* This is the mask used at reset by the chip */
#define TMIO_MASK_ALL 0x837f031d
-#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND | \
- TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
-#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND | \
- TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
+#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND)
+#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND)
#define TMIO_MASK_CMD (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT | \
TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
#define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
--
1.6.2.4
--
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 02/05] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2
2010-02-17 7:37 [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Magnus Damm
2010-02-17 7:37 ` [PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled Magnus Damm
@ 2010-02-17 7:37 ` Magnus Damm
2010-02-17 7:38 ` [PATCH 03/05] tmio_mmc: Use 100ms mmc_detect_change() delay Magnus Damm
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2010-02-17 7:37 UTC (permalink / raw)
To: linux-mmc
Cc: sameo, linux-sh, linus.ml.walleij, g.liakhovetski, goda.yusuke,
ian, lethal, akpm, Magnus Damm
From: Yusuke Goda <goda.yusuke@renesas.com>
Enable MMC_CAP_XX support in the tmio_mmc driver if
pdata->capabilities is set.
Signed-off-by: Yusuke Goda <goda.yusuke@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
---
Previously posted by Goda-san to linux-mmc 20100216 as
"[PATCH v2] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support"
drivers/mmc/host/tmio_mmc.c | 1 +
include/linux/mfd/tmio.h | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
index e22c3fa..e2c0cc9 100644
--- a/drivers/mmc/host/tmio_mmc.c
+++ b/drivers/mmc/host/tmio_mmc.c
@@ -550,6 +550,7 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev)
mmc->ops = &tmio_mmc_ops;
mmc->caps = MMC_CAP_4_BIT_DATA;
+ mmc->caps |= pdata->capabilities;
mmc->f_max = pdata->hclk;
mmc->f_min = mmc->f_max / 512;
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
index 9cb1834..37d9414 100644
--- a/include/linux/mfd/tmio.h
+++ b/include/linux/mfd/tmio.h
@@ -60,6 +60,7 @@ void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state);
*/
struct tmio_mmc_data {
const unsigned int hclk;
+ unsigned long capabilities;
void (*set_pwr)(struct platform_device *host, int state);
void (*set_clk_div)(struct platform_device *host, int state);
};
--
1.6.4.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 03/05] tmio_mmc: Use 100ms mmc_detect_change() delay
2010-02-17 7:37 [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Magnus Damm
2010-02-17 7:37 ` [PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled Magnus Damm
2010-02-17 7:37 ` [PATCH 02/05] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2 Magnus Damm
@ 2010-02-17 7:38 ` Magnus Damm
2010-02-17 7:38 ` [PATCH 04/05] tmio_mmc: Remove const from platform data V3 Magnus Damm
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2010-02-17 7:38 UTC (permalink / raw)
To: linux-mmc
Cc: sameo, linux-sh, linus.ml.walleij, Magnus Damm, goda.yusuke, ian,
lethal, akpm, g.liakhovetski
From: Magnus Damm <damm@opensource.se>
This patch changes the tmio_mmc driver to wait 100ms
before checking the card detect status. This type of
delay is quite common among mmc drivers, it seems that
most hardware platforms need to give the hardware some
time to settle before checking card availabilty.
Hotplug is half-broken without this patch on the sh7724
Ecovec board. Hot insertion seems ok but eject is never
detected without this patch.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
Previously posted to linux-mmc 20100215 as
"[PATCH] tmio_mmc: use 100ms mmc_detect_change() delay"
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 2010-02-15 20:28:15.000000000 +0900
@@ -323,7 +323,7 @@ static irqreturn_t tmio_mmc_irq(int irq,
if (ireg & (TMIO_STAT_CARD_INSERT | TMIO_STAT_CARD_REMOVE)) {
ack_mmc_irqs(host, TMIO_STAT_CARD_INSERT |
TMIO_STAT_CARD_REMOVE);
- mmc_detect_change(host->mmc, 0);
+ mmc_detect_change(host->mmc, msecs_to_jiffies(100));
}
/* CRC and other errors */
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 04/05] tmio_mmc: Remove const from platform data V3
2010-02-17 7:37 [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Magnus Damm
` (2 preceding siblings ...)
2010-02-17 7:38 ` [PATCH 03/05] tmio_mmc: Use 100ms mmc_detect_change() delay Magnus Damm
@ 2010-02-17 7:38 ` Magnus Damm
2010-02-17 7:38 ` [PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls Magnus Damm
2010-02-19 11:46 ` [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Samuel Ortiz
5 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2010-02-17 7:38 UTC (permalink / raw)
To: linux-mmc
Cc: sameo, linux-sh, linus.ml.walleij, g.liakhovetski, goda.yusuke,
ian, lethal, Magnus Damm, akpm
From: Magnus Damm <damm@opensource.se>
Remove const from the tmio-mmc platform data hclk V3.
This change makes it possible to remove the type cast
from the sh_mobile_sdhi driver which is using the clock
framework to get the clock rate.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
Previously posted V2 to linux-mmc 20091126 as
"[PATCH 02/03] mmc: Remove const from tmio-mmc platform data V2"
Changes from V2:
- rediff to fit on top of capabilities patch
include/linux/mfd/tmio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 0003/include/linux/mfd/tmio.h
+++ work/include/linux/mfd/tmio.h 2010-02-17 15:52:15.000000000 +0900
@@ -59,7 +59,7 @@ void tmio_core_mmc_clk_div(void __iomem
* data for the MMC controller
*/
struct tmio_mmc_data {
- const unsigned int hclk;
+ unsigned int hclk;
unsigned long capabilities;
void (*set_pwr)(struct platform_device *host, int state);
void (*set_clk_div)(struct platform_device *host, int state);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls
2010-02-17 7:37 [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Magnus Damm
` (3 preceding siblings ...)
2010-02-17 7:38 ` [PATCH 04/05] tmio_mmc: Remove const from platform data V3 Magnus Damm
@ 2010-02-17 7:38 ` Magnus Damm
2010-02-19 11:46 ` [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Samuel Ortiz
5 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2010-02-17 7:38 UTC (permalink / raw)
To: linux-mmc
Cc: sameo, linux-sh, linus.ml.walleij, akpm, goda.yusuke, ian, lethal,
Magnus Damm, g.liakhovetski
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>
---
Previously posted to linux-mmc 20091126 as
"[PATCH 03/03] mmc: Balance tmio-mmc cell enable()/disable() calls"
drivers/mmc/host/tmio_mmc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- 0004/drivers/mmc/host/tmio_mmc.c
+++ work/drivers/mmc/host/tmio_mmc.c 2010-02-17 15:54:01.000000000 +0900
@@ -569,14 +569,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);
@@ -588,6 +588,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:
@@ -598,6 +601,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);
@@ -606,6 +610,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] 9+ messages in thread
* Re: [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes
2010-02-17 7:37 [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Magnus Damm
` (4 preceding siblings ...)
2010-02-17 7:38 ` [PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls Magnus Damm
@ 2010-02-19 11:46 ` Samuel Ortiz
2010-02-22 4:43 ` Magnus Damm
5 siblings, 1 reply; 9+ messages in thread
From: Samuel Ortiz @ 2010-02-19 11:46 UTC (permalink / raw)
To: Magnus Damm
Cc: linux-mmc, linux-sh, linus.ml.walleij, g.liakhovetski,
goda.yusuke, ian, lethal, akpm
Hi Magnus,
On Wed, Feb 17, 2010 at 04:37:35PM +0900, Magnus Damm wrote:
> tmio_mmc: SDHI hotplug and random fixes
>
> [PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled
> [PATCH 02/05] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2
> [PATCH 03/05] tmio_mmc: Use 100ms mmc_detect_change() delay
> [PATCH 04/05] tmio_mmc: Remove const from platform data V3
> [PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls
>
> These patches are a collection of fixes for SDHI hotplug and
> other minor improvements for the tmio_mmc driver.
>
> The first and the third patch contain tmio-mmc specific fixes
> for SDHI hotplug. Hot insertion and eject have been tested using
> the sh-2.6 tree with the two SDHI blocks provided by the sh7724
> processor using Ecovec24 and ms7724se boards. The single SDHI
> block included in sh7722 has been tested on Migo-R.
>
> The second patch is the ground work to allow the SDHI mfd driver
> to enable MMC_CAP_MMC_HIGHSPEED.
>
> The last two patches are just random improvements and fixes for
> the tmio_mmc driver.
Since some of this code depends on the tmio.h changes, I'm taking this
patchset. Please let me know if that's fine with you.
Cheers,
Samuel.
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> drivers/mmc/host/tmio_mmc.c | 13 ++++++++++---
> drivers/mmc/host/tmio_mmc.h | 6 ++----
> include/linux/mfd/tmio.h | 3 ++-
> 3 files changed, 14 insertions(+), 8 deletions(-)
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes
2010-02-19 11:46 ` [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Samuel Ortiz
@ 2010-02-22 4:43 ` Magnus Damm
2010-02-28 19:03 ` Samuel Ortiz
0 siblings, 1 reply; 9+ messages in thread
From: Magnus Damm @ 2010-02-22 4:43 UTC (permalink / raw)
To: Samuel Ortiz
Cc: linux-mmc, linux-sh, linus.ml.walleij, g.liakhovetski,
goda.yusuke, ian, lethal, akpm
Hi Samuel,
On Fri, Feb 19, 2010 at 8:46 PM, Samuel Ortiz <sameo@linux.intel.com> wrote:
> On Wed, Feb 17, 2010 at 04:37:35PM +0900, Magnus Damm wrote:
>> tmio_mmc: SDHI hotplug and random fixes
>>
>> [PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled
>> [PATCH 02/05] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2
>> [PATCH 03/05] tmio_mmc: Use 100ms mmc_detect_change() delay
>> [PATCH 04/05] tmio_mmc: Remove const from platform data V3
>> [PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls
>>
> Since some of this code depends on the tmio.h changes, I'm taking this
> patchset. Please let me know if that's fine with you.
Sounds great, thank you! I've just posted two patches for
sh_mobile_sdhi, please pick them up as well if possible.
Thanks,
/ magnus
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes
2010-02-22 4:43 ` Magnus Damm
@ 2010-02-28 19:03 ` Samuel Ortiz
0 siblings, 0 replies; 9+ messages in thread
From: Samuel Ortiz @ 2010-02-28 19:03 UTC (permalink / raw)
To: Magnus Damm
Cc: linux-mmc, linux-sh, linus.ml.walleij, g.liakhovetski,
goda.yusuke, ian, lethal, akpm
Hi Magnus,
On Mon, Feb 22, 2010 at 01:43:54PM +0900, Magnus Damm wrote:
> Hi Samuel,
>
> On Fri, Feb 19, 2010 at 8:46 PM, Samuel Ortiz <sameo@linux.intel.com> wrote:
> > On Wed, Feb 17, 2010 at 04:37:35PM +0900, Magnus Damm wrote:
> >> tmio_mmc: SDHI hotplug and random fixes
> >>
> >> [PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled
> >> [PATCH 02/05] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2
> >> [PATCH 03/05] tmio_mmc: Use 100ms mmc_detect_change() delay
> >> [PATCH 04/05] tmio_mmc: Remove const from platform data V3
> >> [PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls
> >>
> > Since some of this code depends on the tmio.h changes, I'm taking this
> > patchset. Please let me know if that's fine with you.
>
> Sounds great, thank you! I've just posted two patches for
> sh_mobile_sdhi, please pick them up as well if possible.
Done, thanks a lot.
Cheers,
Samuel.
> Thanks,
>
> / magnus
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-02-28 19:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-17 7:37 [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Magnus Damm
2010-02-17 7:37 ` [PATCH 01/05] tmio_mmc: Keep card-detect interrupts enabled Magnus Damm
2010-02-17 7:37 ` [PATCH 02/05] tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2 Magnus Damm
2010-02-17 7:38 ` [PATCH 03/05] tmio_mmc: Use 100ms mmc_detect_change() delay Magnus Damm
2010-02-17 7:38 ` [PATCH 04/05] tmio_mmc: Remove const from platform data V3 Magnus Damm
2010-02-17 7:38 ` [PATCH 05/05] tmio_mmc: Balance cell enable()/disable() calls Magnus Damm
2010-02-19 11:46 ` [PATCH 00/05] tmio_mmc: SDHI hotplug and random fixes Samuel Ortiz
2010-02-22 4:43 ` Magnus Damm
2010-02-28 19:03 ` Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).