From: mr.nuke.me@gmail.com (Alexandru Gagniuc)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 0/1] ARM: sun4i: spi: Allow transfers larger than FIFO size
Date: Wed, 19 Mar 2014 15:41:09 -0500 [thread overview]
Message-ID: <1395261670-19386-3-git-send-email-mr.nuke.me@gmail.com> (raw)
In-Reply-To: <1395261670-19386-1-git-send-email-mr.nuke.me@gmail.com>
This is the second iteration of the patches sent yesterday. Per
Maxime's request, I have squashed them into one single patch, and
applied most of the suggestion he made.
As far as only clearing the interrupt _after_ draining the FIFO, I
found that we usually get one extra Rx interrupt per burst if we do
this, so I left the comment in.
>> /* Enable the interrupts */
>> - sun4i_spi_write(sspi, SUN4I_INT_CTL_REG, SUN4I_INT_CTL_TC |
>> - SUN4I_INT_CTL_RF_F34);
>> + reg = SUN4I_INT_CTL_TC | SUN4I_INT_CTL_RF_F34;
>> + /* Only enable Tx FIFO interrupt if we really need it */
>> + if (tx_len > SUN4I_FIFO_DEPTH)
>> + reg |= SUN4I_INT_CTL_TF_E34;
>> + sun4i_spi_write(sspi, SUN4I_INT_CTL_REG, reg);
>
> I'd be much dumber than that. Why don't you just enable both
> interrupts all the time if we need larger transfers ?
As I've pointed out previously, this interrupt is PITA, as it triggers
an IRQ storm if enabled without much thought. I found that
(tx_len > SUN4I_FIFO_DEPTH) is the best check for when it's safe to
enable this interrupt.
Alexandru Gagniuc (1):
ARM: sun4i: spi: Allow transfers larger than FIFO size
drivers/spi/spi-sun4i.c | 68 +++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 63 insertions(+), 5 deletions(-)
--
1.8.5.3
next prev parent reply other threads:[~2014-03-19 20:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 20:41 [PATCH v2 0/1] ARM: sun4i: spi: Allow transfers larger than FIFO size Alexandru Gagniuc
2014-03-19 20:41 ` [PATCH v2 1/1] " Alexandru Gagniuc
2014-03-19 20:41 ` Alexandru Gagniuc [this message]
2014-03-19 21:28 ` [PATCH v3 " Alexandru Gagniuc
2014-03-22 17:50 ` Maxime Ripard
2014-03-26 13:59 ` [PATCH v4] " Alexandru Gagniuc
2014-03-31 10:45 ` Maxime Ripard
2014-04-01 2:16 ` [PATCH v5] " Alexandru Gagniuc
2014-04-01 16:22 ` Maxime Ripard
2014-04-01 17:26 ` [PATCH RESEND " Alexandru Gagniuc
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=1395261670-19386-3-git-send-email-mr.nuke.me@gmail.com \
--to=mr.nuke.me@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).