From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Vitaly Wool <vitalywool@gmail.com>,
drzeus-mmc@drzeus.cx, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix random SD/MMC card recognition failures on ARM Versatile
Date: Thu, 23 Nov 2006 19:57:57 +0000 [thread overview]
Message-ID: <20061123195757.GA25794@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20061123194236.GD8984@flint.arm.linux.org.uk>
On Thu, Nov 23, 2006 at 07:42:36PM +0000, Russell King wrote:
> On Thu, Nov 23, 2006 at 10:29:30PM +0300, Vitaly Wool wrote:
> > On 11/23/06, Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> > >Doubtful. mmci_stop_data() already does this, which will be called
> > >immediately prior to mmci_request_end(). So you're doubling up the
> > >writes to registers again.
> >
> > There's the case (mmci_cmd_irq) where mmc_stop_data is not called
> > prior to mmci_request_end(), so it's not that simple.
>
> Ah, I see it. In that case we need to call mmc_stop_data() when
> we're ending the initial command due to an error. IOW, like this:
I'll also add that with the way we handle the MMCI, it is highly likely
that you _will_ see FIFO errors from time to time on this platform.
The problem is that we don't have DMA up and running on this platform,
so we are entirely at the mercy of interrupt-driven PIO. In addition,
the MMCI FIFOs must be read _before_ they completely fill to avoid
overrun errors. Coupling these two facts together, it's easy to see
that interrupt latency is _critical_ to avoiding FIFO overruns (error 3).
In general, if you do _anything_ with the board while it's trying to
access MMC cards, you will probably get some FIFO overruns.
There are three solutions:
1. Lower the maximum clock rate that the MMCI will allow, eg:
insmod mmci fmax=257816
2. Avoid all other system activity while MMC is being accessed.
3. Someone needs to _sanely_ implement DMA on this platform.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2006-11-23 19:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-23 15:46 [PATCH] fix random SD/MMC card recognition failures on ARM Versatile Vitaly Wool
2006-11-23 16:03 ` Russell King
2006-11-23 19:29 ` Vitaly Wool
2006-11-23 19:42 ` Russell King
2006-11-23 19:57 ` Russell King [this message]
2006-11-24 7:54 ` Vitaly Wool
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=20061123195757.GA25794@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=drzeus-mmc@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=vitalywool@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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