public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] MMC0: DMA transfer failed
@ 2012-04-02 14:01 Fabio Estevam
  2012-04-02 14:41 ` Marek Vasut
  2012-04-02 14:53 ` Stefano Babic
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2012-04-02 14:01 UTC (permalink / raw)
  To: u-boot

Hi,

On a mx28evk board I am getting the following using top of tree U-boot:

U-Boot 2012.04-rc1-00001-g037cbfd (Apr 02 2012 - 10:57:48)

Freescale i.MX28 family at 454 MHz
DRAM:  128 MiB
MMC:   MXS MMC: 0
MMC0: DMA transfer failed
MMC0: DMA transfer failed
MMC0: DMA transfer failed
MMC0: DMA transfer failed
MMC init failed
Using default environment

Is there any patch I am missing?

Thanks,

Fabio Estevam

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

* [U-Boot] MMC0: DMA transfer failed
  2012-04-02 14:01 [U-Boot] MMC0: DMA transfer failed Fabio Estevam
@ 2012-04-02 14:41 ` Marek Vasut
  2012-04-02 15:40   ` Fabio Estevam
  2012-04-02 14:53 ` Stefano Babic
  1 sibling, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2012-04-02 14:41 UTC (permalink / raw)
  To: u-boot

Dear Fabio Estevam,

> Hi,
> 
> On a mx28evk board I am getting the following using top of tree U-boot:
> 
> U-Boot 2012.04-rc1-00001-g037cbfd (Apr 02 2012 - 10:57:48)
> 
> Freescale i.MX28 family at 454 MHz
> DRAM:  128 MiB
> MMC:   MXS MMC: 0
> MMC0: DMA transfer failed
> MMC0: DMA transfer failed
> MMC0: DMA transfer failed
> MMC0: DMA transfer failed
> MMC init failed
> Using default environment

No, it means I might just have a good card and I didn't notice this. I really do 
need to get some crappy (new) cards to track down these issues. Fabio, can you 
please try debugging this?

> Is there any patch I am missing?
> 
> Thanks,
> 
> Fabio Estevam

Best regards,
Marek Vasut

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

* [U-Boot] MMC0: DMA transfer failed
  2012-04-02 14:01 [U-Boot] MMC0: DMA transfer failed Fabio Estevam
  2012-04-02 14:41 ` Marek Vasut
@ 2012-04-02 14:53 ` Stefano Babic
  2012-04-02 15:01   ` Marek Vasut
  1 sibling, 1 reply; 6+ messages in thread
From: Stefano Babic @ 2012-04-02 14:53 UTC (permalink / raw)
  To: u-boot

On 02/04/2012 16:01, Fabio Estevam wrote:
> Hi,
> 
> On a mx28evk board I am getting the following using top of tree U-boot:
> 
> U-Boot 2012.04-rc1-00001-g037cbfd (Apr 02 2012 - 10:57:48)
> 
> Freescale i.MX28 family at 454 MHz
> DRAM:  128 MiB
> MMC:   MXS MMC: 0
> MMC0: DMA transfer failed
> MMC0: DMA transfer failed
> MMC0: DMA transfer failed
> MMC0: DMA transfer failed
> MMC init failed
> Using default environment
> 
> Is there any patch I am missing?

Hi Fabio,

maybe it is worth to check first if it depends on the data cache, that
is now turned on. Add CONFIG_CMD_CACHE to the configuartion file, and
try to start mmc with and without dcache.

Best regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

* [U-Boot] MMC0: DMA transfer failed
  2012-04-02 14:53 ` Stefano Babic
@ 2012-04-02 15:01   ` Marek Vasut
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2012-04-02 15:01 UTC (permalink / raw)
  To: u-boot

Dear Stefano Babic,

> On 02/04/2012 16:01, Fabio Estevam wrote:
> > Hi,
> > 
> > On a mx28evk board I am getting the following using top of tree U-boot:
> > 
> > U-Boot 2012.04-rc1-00001-g037cbfd (Apr 02 2012 - 10:57:48)
> > 
> > Freescale i.MX28 family at 454 MHz
> > DRAM:  128 MiB
> > MMC:   MXS MMC: 0
> > MMC0: DMA transfer failed
> > MMC0: DMA transfer failed
> > MMC0: DMA transfer failed
> > MMC0: DMA transfer failed
> > MMC init failed
> > Using default environment
> > 
> > Is there any patch I am missing?
> 
> Hi Fabio,
> 
> maybe it is worth to check first if it depends on the data cache, that
> is now turned on. Add CONFIG_CMD_CACHE to the configuartion file, and
> try to start mmc with and without dcache.

The cache should be off on m28evk and so should be on mx28evk.

> Best regards,
> Stefano

Best regards,
Marek Vasut

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

* [U-Boot] MMC0: DMA transfer failed
  2012-04-02 14:41 ` Marek Vasut
@ 2012-04-02 15:40   ` Fabio Estevam
  2012-04-02 16:34     ` Marek Vasut
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2012-04-02 15:40 UTC (permalink / raw)
  To: u-boot

On Mon, Apr 2, 2012 at 11:41 AM, Marek Vasut <marek.vasut@gmail.com> wrote:

> No, it means I might just have a good card and I didn't notice this. I really do
> need to get some crappy (new) cards to track down these issues. Fabio, can you
> please try debugging this?

Ok, I am debugging this.

What do you think about the change below?

--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -191,7 +191,7 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct
        else
                cache_data_count = data_count;

-       if (data->flags & MMC_DATA_READ) {
+       if (data->flags & MMC_DATA_WRITE) {
                priv->desc->cmd.data = MXS_DMA_DESC_COMMAND_DMA_WRITE;
                priv->desc->cmd.address = (dma_addr_t)data->dest;
        } else {

It doesn't fix this issue, but it seems correct.

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

* [U-Boot] MMC0: DMA transfer failed
  2012-04-02 15:40   ` Fabio Estevam
@ 2012-04-02 16:34     ` Marek Vasut
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2012-04-02 16:34 UTC (permalink / raw)
  To: u-boot

Dear Fabio Estevam,

> On Mon, Apr 2, 2012 at 11:41 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > No, it means I might just have a good card and I didn't notice this. I
> > really do need to get some crappy (new) cards to track down these
> > issues. Fabio, can you please try debugging this?
> 
> Ok, I am debugging this.
> 
> What do you think about the change below?
> 
> --- a/drivers/mmc/mxsmmc.c
> +++ b/drivers/mmc/mxsmmc.c
> @@ -191,7 +191,7 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
> struct else
>                 cache_data_count = data_count;
> 
> -       if (data->flags & MMC_DATA_READ) {
> +       if (data->flags & MMC_DATA_WRITE) {
>                 priv->desc->cmd.data = MXS_DMA_DESC_COMMAND_DMA_WRITE;
>                 priv->desc->cmd.address = (dma_addr_t)data->dest;
>         } else {
> 
> It doesn't fix this issue, but it seems correct.

No it's not, when you do SD READ, you read the data into the dest buffer.

Best regards,
Marek Vasut

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

end of thread, other threads:[~2012-04-02 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-02 14:01 [U-Boot] MMC0: DMA transfer failed Fabio Estevam
2012-04-02 14:41 ` Marek Vasut
2012-04-02 15:40   ` Fabio Estevam
2012-04-02 16:34     ` Marek Vasut
2012-04-02 14:53 ` Stefano Babic
2012-04-02 15:01   ` Marek Vasut

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