AnsweredAssumed Answered

mcf5441x eSDHC CRC data error on DMA read on ACMD51

Question asked by Angelo Dureghello on Feb 25, 2019
Latest reply on Mar 7, 2019 by Angelo Dureghello

Dear all,

 

i am facing a strange issue developing a small Linux driver, based on existing sdhci.c, for this device. The driver uses SDMA.

 

In short, after ACMD51 is issued, i get, in order, 3 interrupts: "cmd trasferred OK", "dma (rx) transfer completed ok", and finally "data crc error". The data received in the SDMA buffer (SCR register) seems well formed and to be correct),

 

In details:
[    5.300000] esdhc_pltfm_set_clock() at 400000 done
[    5.320000] sdhci.c sdhci_send_command() : cmd 52 arg 3072
[    5.320000] sdhci_irq() : IRQ status 0x00010001
[    5.340000] sdhci_irq() : IRQ status 0x00000080
[    5.340000] sdhci.c sdhci_send_command() : cmd 52 arg -2147480568
[    5.340000] sdhci_irq() : IRQ status 0x00010001
[    5.350000] sdhci_irq() : IRQ status 0x00000080
[    5.370000] sdhci.c sdhci_send_command() : cmd 0 arg 0
[    5.370000] sdhci_irq() : IRQ status 0x00000001
[    5.410000] sdhci.c sdhci_send_command() : cmd 8 arg 426
[    5.410000] sdhci_irq() : IRQ status 0x00000001
[    5.420000] sdhci.c sdhci_send_command() : cmd 5 arg 0
[    5.420000] sdhci_irq() : IRQ status 0x00010001
[    5.430000] sdhci_irq() : IRQ status 0x00000080
[    5.430000] sdhci.c sdhci_send_command() : cmd 5 arg 0
[    5.430000] sdhci_irq() : IRQ status 0x00010001
[    5.440000] sdhci_irq() : IRQ status 0x00000080
[    5.450000] sdhci.c sdhci_send_command() : cmd 5 arg 0
[    5.450000] sdhci_irq() : IRQ status 0x00010001
[    5.460000] sdhci_irq() : IRQ status 0x00000080
[    5.460000] sdhci.c sdhci_send_command() : cmd 5 arg 0
[    5.460000] sdhci_irq() : IRQ status 0x00010001
[    5.470000] sdhci_irq() : IRQ status 0x00000080
[    5.480000] sdhci.c sdhci_send_command() : cmd 55 arg 0
[    5.480000] sdhci_irq() : IRQ status 0x00000001
[    5.490000] sdhci.c sdhci_send_command() : cmd 41 arg 0
[    5.490000] sdhci_irq() : IRQ status 0x00000001
[    5.510000] sdhci.c sdhci_send_command() : cmd 0 arg 0
[    5.510000] sdhci_irq() : IRQ status 0x00000001
[    5.540000] sdhci.c sdhci_send_command() : cmd 8 arg 426
[    5.540000] sdhci_irq() : IRQ status 0x00000001
[    5.560000] sdhci.c sdhci_send_command() : cmd 55 arg 0
[    5.560000] sdhci_irq() : IRQ status 0x00000001
[    5.580000] sdhci.c sdhci_send_command() : cmd 41 arg 1075838976
[    5.580000] sdhci_irq() : IRQ status 0x00000001
[    5.610000] sdhci.c sdhci_send_command() : cmd 55 arg 0
[    5.610000] sdhci_irq() : IRQ status 0x00000001
[    5.620000] sdhci.c sdhci_send_command() : cmd 41 arg 1075838976
[    5.620000] sdhci_irq() : IRQ status 0x00000001
[    5.630000] sdhci.c sdhci_send_command() : cmd 2 arg 0
[    5.630000] sdhci_irq() : IRQ status 0x00000001
[    5.640000] sdhci.c sdhci_send_command() : cmd 3 arg 0
[    5.640000] sdhci_irq() : IRQ status 0x00000001
[    5.650000] sdhci.c sdhci_send_command() : cmd 9 arg 305397760
[    5.650000] sdhci_irq() : IRQ status 0x00000001
[    5.660000] sdhci.c sdhci_send_command() : cmd 7 arg 305397760
[    5.660000] sdhci_irq() : IRQ status 0x00000001
[    5.670000] sdhci.c sdhci_send_command() : cmd 55 arg 305397760
[    5.670000] sdhci_irq() : IRQ status 0x00000001
[    5.680000] sdhci.c sdhci_send_command() : cmd 51 arg 0
[    5.680000] sdhci_irq() : IRQ status 0x00000001
[    5.770000] sdhci_irq() : IRQ status 0x00000008
[    5.770000] sdhci_irq() : IRQ status 0x00200002  <---- CRC data error
[    5.770000] sdhci_irq() : IRQ status 0x00000080
[    5.780000] sdhci_irq() : IRQ status 0x00000040
[    5.780000] mmc0: error -84 whilst initialising SD card

 

If i disable the error check/flag, the driver works fine, i can access the card content accessing /dev/mmcblk0 and data is correct (still need to swap it to LE btw).

 

I have looked into the errata, none of the issues seems to apply to this.

 

Any help is really appreciated.

 

Thanks

Angelo

Outcomes