From: Joachim Foerster <JOFT@gmx•de>
To: linuxppc-dev@ozlabs•org
Cc: lorenz@missinglinkelectronics•com,
dbrownell@users•sourceforge.net, john.linn@xilinx•com,
joachim@missinglinkelectronics•com
Subject: Re: SD card over (xilinx_)SPI, timeout error while CID
Date: Tue, 09 Jun 2009 19:26:01 +0200 [thread overview]
Message-ID: <1244568361.25223.16.camel@localhost> (raw)
In-Reply-To: <1244216069.21470.12.camel@localhost>
Hi,
On Fri, 2009-06-05 at 17:34 +0200, Joachim Foerster wrote:
> we have a very strange problem with SD-card-over-SPI support using
> 2.6.29.4 on our custom PowerPC 405 (Virtex-4 FX FPGA) based board. To
> summarize the problem in one sentence: mmc_spi gets a timeout (error
> -110) after sending MMC command "CMD10" (CID, card identification?).
The problem seems to be these DMA transfers/methods (?), which are used
by mmc_spi, if spi->master->dev.parent->dma_mask is non-NULL in
mmc_spi_probe() .
We detected the problem in form of kind of "data loss/corruption" in
mmc_spi_readbytes() after spi_sync() is called. Data is received
correctly by xilinx_spi (and thus by spi_sync())!
Background: The CMD10 is the first "bigger" ;-) (16 bytes) block
transfer, where mmc_spi waits for the token 0xfe by calling
mmc_spi_skip() in the end and later on receives these 16 bytes. But the
token seems to be "lost/corrupted" and thus a timeout occurs.
For now our dirty workaround is, to remove DMA support by commenting out
the "if (spi->master->dev.parent->dma_mask)" block in mmc_spi_probe().
Note, that in the old 2.6.26+arch/ppc this dma_mask is NULL - so DMA
code is never activated in mmc_spi_probe()!
Conclusion: Either DMA code in mmc_spi has a bug OR dma_*() functions
have a bug OR the device tree setup code should not assign a dma_mask to
xilinx_spi devices?
Any hints? Where do we have to look in case there is something wrong in
device tree setup?
Joachim
next prev parent reply other threads:[~2009-06-09 17:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-05 15:34 SD card over (xilinx_)SPI, timeout error while CID Joachim Foerster
2009-06-05 21:15 ` John Linn
2009-06-06 15:14 ` Peter Korsgaard
2009-06-08 15:14 ` Lorenz Kolb
2009-06-09 17:26 ` Joachim Foerster [this message]
2009-06-11 19:15 ` Ricardo Ribalda Delgado
[not found] ` <aa76a2be0906111215j15933053rf128f1985a982ca0__26561.0047536486$1244748319$gmane$org@mail.gmail.com>
2009-06-11 20:05 ` Lorenz Kolb
2009-06-11 20:49 ` Ricardo Ribalda Delgado
2009-06-11 21:07 ` Wolfgang Denk
2009-06-11 21:16 ` Ricardo Ribalda Delgado
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244568361.25223.16.camel@localhost \
--to=joft@gmx$(echo .)de \
--cc=dbrownell@users$(echo .)sourceforge.net \
--cc=joachim@missinglinkelectronics$(echo .)com \
--cc=john.linn@xilinx$(echo .)com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=lorenz@missinglinkelectronics$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox