From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mmci: fixup broken_blockend variant patch v2
Date: Thu, 27 Jan 2011 11:06:03 +0000 [thread overview]
Message-ID: <20110127110603.GA25968@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTim4i8BibVFmn2C4ixRoMrX5mNU9HZjW2KGMXsYZ@mail.gmail.com>
On Fri, Jan 21, 2011 at 01:53:06PM +0100, Linus Walleij wrote:
> 2011/1/20 Linus Walleij <linus.ml.walleij@gmail.com>:
> > But if the transfer is complete, MCIDataCnt should be valid
> > as well. I'll read the datasheet(s) closer and see if I get some
> > useful clues about which one is more reliable in the error
> > case.
>
> I've looked into this. It appears AFAICT that the FIFOCNT is
> reset to zero whenever Tx or Rx is not active, i.e. on an error. So
> this register is not helpful for determining the number of blocks
> left at an error, it will always be zero at that point.
>
> MCIDATACNT on the other hand comes from the datapath
> state machine which in turn controls the FIFO. It is a totally
> separate counter inside the state machine, loaded from the
> same length register, but updated from the datapath control
> machinery.
Something occurs to me - isn't DATACNT a byte counter rather than a word
counter? I think that's something which needs to be confirmed. The TRM
is a little confusing:
| Data counter register, MCIDataCnt The MCIDataCnt register loads the value
| from the data length register (see Data length register, MCIDataLength on
| page 3-11) when the DPSM moves from the IDLE state to the WAIT_R or WAIT_S
| state. As data is transferred, the counter decrements the value until it
| reaches 0.
The first sentence implies that the value which appears here initially
is the value which was written to the data length register, which is a
byte count. The second sentence _could_ be interpreted as it decrementing
by one each time data is transferred to/from the FIFO (which are 32-bit
words).
I think this requires some experimentation...
next prev parent reply other threads:[~2011-01-27 11:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-17 14:37 [PATCH] mmci: fixup broken_blockend variant patch v2 Linus Walleij
2011-01-17 15:12 ` Rabin Vincent
2011-01-17 16:02 ` Linus Walleij
2011-01-18 12:14 ` Russell King - ARM Linux
2011-01-19 20:34 ` Linus Walleij
2011-01-19 20:51 ` Russell King - ARM Linux
2011-01-19 23:52 ` Linus Walleij
2011-01-21 12:53 ` Linus Walleij
2011-01-23 18:01 ` Russell King - ARM Linux
2011-01-23 21:40 ` Linus Walleij
2011-01-23 23:09 ` Russell King - ARM Linux
2011-01-24 8:18 ` Linus Walleij
2011-01-24 11:21 ` Russell King - ARM Linux
2011-01-24 14:29 ` Linus Walleij
2011-01-27 11:06 ` Russell King - ARM Linux [this message]
2011-01-27 14:16 ` Linus Walleij
2011-01-17 15:36 ` Rabin Vincent
2011-01-17 15:56 ` Linus Walleij
2011-01-17 16:56 ` Rabin Vincent
2011-01-18 15:01 ` Linus Walleij
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=20110127110603.GA25968@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.