spi-imx: extra data in rxfifo after DMA transfer on i.MX6q

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

 



Hello Robin,

while debugging a problem where sometimes reading from an spi flash
contains wrong data in the read stream I stumbled over
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f62caccd12c17e4cb516d43a6e4dd8a3abc1f7e0
.

I'm on i.MX6q, but the problem you described in the note does seem to
match exactly my problem. Are you aware of more details for this
problem? When disabling DMA the problem isn't reproducible.

What I actually do to get the problem (sometimes) is:

        check_one() {
                mtdpath="$1"
                pattern="$2"

                echo "$pattern" > "$mtdpath"
                mtdcontent="$(head -c ${#pattern} $mtdpath)"

                test "$pattern" = "$mtdcontent"
        }

        check() {
                i=0
                while check_one "$@"; do ((i++)); echo "good $i"; done
        }

	check /dev/mtd0 Pattern123Pattern123Pattern123

(mtd0 is an MRAM, so no need for erase).

In the error case I get:

	# hexdump -C /dev/mtd0 | head -n 2
        00000000  ff 50 61 74 74 65 72 6e  31 32 33 50 61 74 74 65  |.Pattern123Patte|
        00000010  72 6e 31 32 33 50 61 74  74 65 72 6e 31 32 33 0a  |rn123Pattern123.|

which is reproducible until the spi driver is rebound.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux