[U-Boot] MMC0: DMA transfer failed

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

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

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.

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

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

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
participants (3)
-
Fabio Estevam
-
Marek Vasut
-
Stefano Babic