* [PATCH] mmc sdhci i.MX5: make mmc cards work
@ 2012-02-17 10:51 Sascha Hauer
2012-02-20 6:31 ` Shawn Guo
0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2012-02-17 10:51 UTC (permalink / raw)
To: linux-mmc; +Cc: Chris Ball, Shawn Guo, Wolfram Sang, Sascha Hauer
On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the
SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION
command. This works for SD cards. However, with MMC cards
the MMC_SET_BLOCK_COUNT command is used instead, but this needs
the same handling. Fix MMC cards by testing for the
MMC_SET_BLOCK_COUNT command aswell. Tested on a custom i.MX53
board with a Transcend MMC+ card and eMMC.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/mmc/host/sdhci-esdhc-imx.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index d601e41..cd35dc4 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -269,7 +269,8 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
imx_data->scratchpad = val;
return;
case SDHCI_COMMAND:
- if ((host->cmd->opcode == MMC_STOP_TRANSMISSION)
+ if ((host->cmd->opcode == MMC_STOP_TRANSMISSION ||
+ host->cmd->opcode == MMC_SET_BLOCK_COUNT)
&& (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))
val |= SDHCI_CMD_ABORTCMD;
--
1.7.9
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc sdhci i.MX5: make mmc cards work
2012-02-17 10:51 [PATCH] mmc sdhci i.MX5: make mmc cards work Sascha Hauer
@ 2012-02-20 6:31 ` Shawn Guo
2012-02-20 18:41 ` Sascha Hauer
0 siblings, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2012-02-20 6:31 UTC (permalink / raw)
To: Sascha Hauer; +Cc: linux-mmc, Chris Ball, Wolfram Sang
I do not have a mmc card to test the patch, but I tested it and
confirmed it does not break anything about SD support.
On Fri, Feb 17, 2012 at 11:51:49AM +0100, Sascha Hauer wrote:
> On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the
Is this i.MX53 only?
> SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION
> command. This works for SD cards. However, with MMC cards
> the MMC_SET_BLOCK_COUNT command is used instead, but this needs
> the same handling. Fix MMC cards by testing for the
> MMC_SET_BLOCK_COUNT command aswell. Tested on a custom i.MX53
> board with a Transcend MMC+ card and eMMC.
>
I did not find the similar handling in FSL internal tree, but I think
that FSL QA team should have tested it with MMC/eMMC card.
Regards,
Shawn
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/mmc/host/sdhci-esdhc-imx.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index d601e41..cd35dc4 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -269,7 +269,8 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
> imx_data->scratchpad = val;
> return;
> case SDHCI_COMMAND:
> - if ((host->cmd->opcode == MMC_STOP_TRANSMISSION)
> + if ((host->cmd->opcode == MMC_STOP_TRANSMISSION ||
> + host->cmd->opcode == MMC_SET_BLOCK_COUNT)
> && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))
> val |= SDHCI_CMD_ABORTCMD;
>
> --
> 1.7.9
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc sdhci i.MX5: make mmc cards work
2012-02-20 6:31 ` Shawn Guo
@ 2012-02-20 18:41 ` Sascha Hauer
2012-02-21 3:03 ` Shawn Guo
0 siblings, 1 reply; 5+ messages in thread
From: Sascha Hauer @ 2012-02-20 18:41 UTC (permalink / raw)
To: Shawn Guo; +Cc: linux-mmc, Chris Ball, Wolfram Sang
On Mon, Feb 20, 2012 at 02:31:36PM +0800, Shawn Guo wrote:
> I do not have a mmc card to test the patch, but I tested it and
> confirmed it does not break anything about SD support.
>
> On Fri, Feb 17, 2012 at 11:51:49AM +0100, Sascha Hauer wrote:
> > On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the
>
> Is this i.MX53 only?
Don't know. I don't think I have ever explicitely tested MMC cards on
!i.MX53 boards.
>
> > SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION
> > command. This works for SD cards. However, with MMC cards
> > the MMC_SET_BLOCK_COUNT command is used instead, but this needs
> > the same handling. Fix MMC cards by testing for the
> > MMC_SET_BLOCK_COUNT command aswell. Tested on a custom i.MX53
> > board with a Transcend MMC+ card and eMMC.
> >
> I did not find the similar handling in FSL internal tree, but I think
> that FSL QA team should have tested it with MMC/eMMC card.
Which kernel did they test this on? The mmc core uses the
MMC_SET_BLOCK_COUNT command since v3.0-rc1. Earlier kernels
probably worked.
Sascha
>
> Regards,
> Shawn
>
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> > drivers/mmc/host/sdhci-esdhc-imx.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> > index d601e41..cd35dc4 100644
> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> > @@ -269,7 +269,8 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
> > imx_data->scratchpad = val;
> > return;
> > case SDHCI_COMMAND:
> > - if ((host->cmd->opcode == MMC_STOP_TRANSMISSION)
> > + if ((host->cmd->opcode == MMC_STOP_TRANSMISSION ||
> > + host->cmd->opcode == MMC_SET_BLOCK_COUNT)
> > && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))
> > val |= SDHCI_CMD_ABORTCMD;
> >
> > --
> > 1.7.9
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc sdhci i.MX5: make mmc cards work
2012-02-20 18:41 ` Sascha Hauer
@ 2012-02-21 3:03 ` Shawn Guo
2012-03-02 20:34 ` Chris Ball
0 siblings, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2012-02-21 3:03 UTC (permalink / raw)
To: Sascha Hauer; +Cc: linux-mmc, Chris Ball, Wolfram Sang
On 21 February 2012 02:41, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Mon, Feb 20, 2012 at 02:31:36PM +0800, Shawn Guo wrote:
>> I do not have a mmc card to test the patch, but I tested it and
>> confirmed it does not break anything about SD support.
>>
>> On Fri, Feb 17, 2012 at 11:51:49AM +0100, Sascha Hauer wrote:
>> > On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the
>>
>> Is this i.MX53 only?
>
> Don't know. I don't think I have ever explicitely tested MMC cards on
> !i.MX53 boards.
>
>>
>> > SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION
>> > command. This works for SD cards. However, with MMC cards
>> > the MMC_SET_BLOCK_COUNT command is used instead, but this needs
>> > the same handling. Fix MMC cards by testing for the
>> > MMC_SET_BLOCK_COUNT command aswell. Tested on a custom i.MX53
>> > board with a Transcend MMC+ card and eMMC.
>> >
>> I did not find the similar handling in FSL internal tree, but I think
>> that FSL QA team should have tested it with MMC/eMMC card.
>
> Which kernel did they test this on? The mmc core uses the
> MMC_SET_BLOCK_COUNT command since v3.0-rc1. Earlier kernels
> probably worked.
>
FSL internal tree was recently upgraded to v3.0, and I just knew from
QA team that they tested the new tree with a Sandisk eMMC card and it
worked, but have not found a Transcend card to test. Since you are
fixing a problem you are actually seeing and the patch does not break
anything with my testing, so
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Regards,
Shawn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mmc sdhci i.MX5: make mmc cards work
2012-02-21 3:03 ` Shawn Guo
@ 2012-03-02 20:34 ` Chris Ball
0 siblings, 0 replies; 5+ messages in thread
From: Chris Ball @ 2012-03-02 20:34 UTC (permalink / raw)
To: Shawn Guo; +Cc: Sascha Hauer, linux-mmc, Wolfram Sang
Hi,
On Mon, Feb 20 2012, Shawn Guo wrote:
> On 21 February 2012 02:41, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>> On Mon, Feb 20, 2012 at 02:31:36PM +0800, Shawn Guo wrote:
>>> I do not have a mmc card to test the patch, but I tested it and
>>> confirmed it does not break anything about SD support.
>>>
>>> On Fri, Feb 17, 2012 at 11:51:49AM +0100, Sascha Hauer wrote:
>>> > On i.MX53 we have to write a special SDHCI_CMD_ABORTCMD to the
>>>
>>> Is this i.MX53 only?
>>
>> Don't know. I don't think I have ever explicitely tested MMC cards on
>> !i.MX53 boards.
>>
>>>
>>> > SDHCI_TRANSFER_MODE register during a MMC_STOP_TRANSMISSION
>>> > command. This works for SD cards. However, with MMC cards
>>> > the MMC_SET_BLOCK_COUNT command is used instead, but this needs
>>> > the same handling. Fix MMC cards by testing for the
>>> > MMC_SET_BLOCK_COUNT command aswell. Tested on a custom i.MX53
>>> > board with a Transcend MMC+ card and eMMC.
>>> >
>>> I did not find the similar handling in FSL internal tree, but I think
>>> that FSL QA team should have tested it with MMC/eMMC card.
>>
>> Which kernel did they test this on? The mmc core uses the
>> MMC_SET_BLOCK_COUNT command since v3.0-rc1. Earlier kernels
>> probably worked.
>>
> FSL internal tree was recently upgraded to v3.0, and I just knew from
> QA team that they tested the new tree with a Sandisk eMMC card and it
> worked, but have not found a Transcend card to test. Since you are
> fixing a problem you are actually seeing and the patch does not break
> anything with my testing, so
>
> Acked-by: Shawn Guo <shawn.guo@linaro.org>
Thanks, pushed to mmc-next for 3.3. It sounds like you'd like this to
go to 3.{0,1,2}-stable, too?
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-02 20:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-17 10:51 [PATCH] mmc sdhci i.MX5: make mmc cards work Sascha Hauer
2012-02-20 6:31 ` Shawn Guo
2012-02-20 18:41 ` Sascha Hauer
2012-02-21 3:03 ` Shawn Guo
2012-03-02 20:34 ` Chris Ball
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).