linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: martinwguy@gmail.com (Martin Guy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] spi: implemented driver for Cirrus EP93xx SPI controller
Date: Sun, 11 Apr 2010 15:24:21 +0100	[thread overview]
Message-ID: <j2g56d259a01004110724q7e038392r9b7b33772b66e1f1@mail.gmail.com> (raw)
In-Reply-To: <20100410155443.GG2685@gw.healthdatacare.com>

On 4/10/10, Mika Westerberg <mika.westerberg@iki.fi> wrote:
>  Can you try following with your devices?

Woo, nice one!
Same CPU usage (~57%) same throughput (315kb/s) and it's much more
elegant. :) Just using repeated interrupts to handle the last 4 words
instead of the nasty busy-wait loops seems fairer to other interrupts
too!

You can make it even smaller be removing some redundant checks
deriving from the fact that it's synchronous, so N writes always cause
N reads:

>         if (espi->tx == 0 && espi->rx == 0)
>                 espi->fifo_level = 0;

can be

         if (espi->tx == 0)
                 espi->fifo_level = 0;

,

>         while ((ep93xx_spi_read_u8(espi, SSPSR) & SSPSR_RNE) &&
>                 espi->rx < t->len) {

         while ((ep93xx_spi_read_u8(espi, SSPSR) & SSPSR_RNE)) {

and

>         /* is transfer finished? */
>         if (espi->tx == t->len && espi->rx == t->len) {

         if (espi->rx == t->len) {

Cheers!

    M

  reply	other threads:[~2010-04-11 14:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 16:59 [PATCH v2 0/3] spi: driver for Cirrus EP93xx SPI controller Mika Westerberg
2010-03-18 17:00 ` [PATCH v2 1/3] spi: implemented " Mika Westerberg
2010-03-18 17:00   ` [PATCH v2 2/3] ep93xx: added chip revision reading function Mika Westerberg
2010-03-18 17:00     ` [PATCH v2 3/3] ep93xx: SPI driver platform support code Mika Westerberg
2010-03-18 17:27     ` [spi-devel-general] [PATCH v2 2/3] ep93xx: added chip revision reading function H Hartley Sweeten
2010-03-25  9:06       ` Mika Westerberg
2010-03-25 17:20         ` H Hartley Sweeten
2010-03-26 15:40           ` Martin Guy
2010-03-20 18:07     ` Martin Guy
2010-03-20 18:25       ` Daniel Mack
2010-03-20 18:40         ` Martin Guy
2010-03-20 19:31           ` H Hartley Sweeten
2010-03-20 19:48             ` Martin Guy
2010-03-20 18:31       ` Mika Westerberg
2010-03-20 19:42         ` H Hartley Sweeten
2010-03-21 18:45           ` Mika Westerberg
2010-03-25 13:49   ` [PATCH v2 1/3] spi: implemented driver for Cirrus EP93xx SPI controller Martin Guy
2010-03-25 18:43     ` Mika Westerberg
2010-04-01  0:15       ` Martin Guy
2010-04-01  3:00         ` Ryan Mallon
2010-04-01  6:26         ` Mika Westerberg
2010-04-06  5:44         ` Mika Westerberg
2010-04-06 12:50           ` Martin Guy
2010-04-06 18:18             ` Mika Westerberg
2010-04-06 21:28               ` Martin Guy
2010-04-09 17:56                 ` Martin Guy
2010-04-09 18:08                   ` Martin Guy
2010-04-10 15:54                   ` Mika Westerberg
2010-04-11 14:24                     ` Martin Guy [this message]
2010-04-12 10:03                     ` Martin Guy

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=j2g56d259a01004110724q7e038392r9b7b33772b66e1f1@mail.gmail.com \
    --to=martinwguy@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).