
Hi, Fleming and Fabio
Sorry to reply to you so late.
As our manual described.
In the eSDHC, the data buffer can hold up to 128 words (32-bit).
The watermark levels for both write and read can be configured for CPU polling mode. The watermark level can be from 1 word to the maximum of 128 words.
For both DMA read and write, the burst length, can be configured from 1 to the maximum of 16.
The host driver may configure watermark level and burst length value according to the system situation and requirement in the watermark level register (WML).
So if we define CONFIG_SYS_FSL_ESDHC_USE_PIO, this should be needed for CPU Polling mode. My patch works well on my board both for DMA mod and CPU Polling mode.
Since commit 48e0b2bd (powerpc/esdhc: Correct judgement for DATA PIO mode) we see mx6 systems to hang after doing a 'save' command.
Fabio, Did you boot up from sdcard? If so save command will write to SD card. In this case write command will be failed. I'm not familiar with mx6 system. I don't know if there are some difference in Watermark Level Register (eSDHC_WML).
Regards Haijun.
-----Original Message----- From: Fleming Andy-AFLEMING Sent: Wednesday, May 29, 2013 3:52 AM To: Estevam Fabio-R49496 Cc: Zhang Haijun-B42677; wd@denx.de; u-boot@lists.denx.de; sbabic@denx.de; tapani@technexion.com Subject: Re: [PATCH] mmc: fsl_esdhc: Fix hang after 'save' command
On May 28, 2013, at 1:09 PM, Fabio Estevam wrote:
Since commit 48e0b2bd (powerpc/esdhc: Correct judgement for DATA PIO mode) we see mx6 systems to hang after doing a 'save' command.
Revert this commit since the original 'ifdef' logic from 7b43db92 (drivers/mmc/fsl_esdhc.c: fix compiler warnings) was the correct one.
Reported-by: Tapani Utriainen tapani@technexion.com Signed-off-by: Fabio Estevam fabio.estevam@freescale.com
My apologies. I misread that patch. I found it hard to believe that Wolfgang had broken the logic, and that it had been broken for 2 years, but somehow my brain insisted that was the case. I now agree with your assessment, and will apply your patch.
Haijun, please investigate the problem you were trying to solve with this patch, and determine what the actual cause was, and then submit a new patch to fix it.
Andy