[PATCH v1 0/1] mmc: sdhci-esdhc-imx: Conforming to generic SDHCI Specification.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Ultra Secured Digital Host Controller (uSDHC), used in i.MX6
(and, probably, earlier i.MX series too), uses a separate Watermark Levels
register, controlling the amount of data or space available when raising
status bit or interrupt.

The current driver is non-compliant to SDHCI Specification.

This patch sets the watermark level for PIO mode accesses to default
block size (128 words or 512 bytes), so that the i.MX uSDHC behavior
will be consistent to generic SDHCI Specification.

More description about the patch exists in the git commit message.

Test case:
A MMCplus 4GB card was not getting detected with PIO mode enabled on a SabreLite
reference board due to errors while initializing the MMC card. (Temporary
modifications were done in sdhci-esdhc-imx.c and the device tree for SabreLite
to set the transfer mode to PIO mode instead of the default DMA mode).

Here is a snippet of the errors seen in the test case:

root@mx6q:/opt/ltp# [ 6623.022646] mmc1: Timeout waiting for hardware interrupt.
[ 6623.028072] mmc1: Timeout while processing request
[ 6623.032911] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.038707] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.044496] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.050282] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.056068] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.061854] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.067642] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.073428] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.079215] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.085000] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.090785] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.096571] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.102357] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.108143] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.113928] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.119714] mmc1: Error -110: (data) got interrupt 0x00000020
[ 6623.127632] mmc1: Error -110: (data) while processing CMD8 request
[ 6623.134099] mmc1: Error -110: (data) while retrieving EXT_CSD
[ 6623.140566] mmc1: Error 110: while card (re)initializing
[ 6623.146115] mmc1: error -110 whilst initialising MMC card
[ 6623.151529] mmc1: Error -110: while initializing MMC card

The above failure is resolved with the patch integrated.

Tested on a highly modified v3.14 kernel and the patch was deployed
in a commercial consumer product.

The patch was rebased on to the following baseline (untested on this baseline):
https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git/commit/?h=next&id=300ad8992913025b4294d4fc37b6bfff4a8b7ad1
"Merge branch 'fixes' into next" on the "next" branch, based on kernel v4.16.

Recommend that further MMC related testing is performed on recent kernels to
confirm that the patch is worthwhile for the mainline kernel.

Andrew Gabbasov (1):
  mmc: sdhci-esdhc-imx: Set maximum watermark levels for PIO access

 drivers/mmc/host/sdhci-esdhc-imx.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

--
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux