From: David Daney <ddaney.cavm@gmail.com>
To: Shubhrajyoti Datta <omaplinuxkernel@gmail.com>
Cc: David Daney <ddaney.cavm@gmail.com>,
devicetree-discuss@lists.ozlabs.org,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
spi-devel-general@lists.sourceforge.net,
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/2] spi: Add SPI master controller for OCTEON SOCs.
Date: Mon, 14 May 2012 11:13:41 -0700 [thread overview]
Message-ID: <4FB14B55.4070604@gmail.com> (raw)
In-Reply-To: <CAM=Q2csSQWbCOCQpubDok1=hmPvHU0MTEUg+-FGhp91=O5L6Hw@mail.gmail.com>
On 05/13/2012 10:46 PM, Shubhrajyoti Datta wrote:
> Hi David,
> A few comments.
>
> On Sat, May 12, 2012 at 3:04 AM, David Daney<ddaney.cavm@gmail.com> wrote:
[...]
>> +
>> +#define DRV_VERSION "2.0" /* Version 1 was the out-of-tree driver */
> This could be given a miss. As it is less meaningful once accepted.
Well, this leads to the question, what is the purpose of the
'MODULE_VERSION()' macro? If I use that, I need to populate it with a
value.
>
[...]
>> +static void octeon_spi_wait_ready(struct octeon_spi *p)
>> +{
>> + union cvmx_mpi_sts mpi_sts;
>> + unsigned int loops = 0;
>> +
>> + do {
>> + if (loops++)
>> + __delay(500);
> Could we allow have a non-busy loop here?
>
We could, but I thought about it and chose not to.
The SPI hardware can queue a maximum of 9 bytes (72 bits) before
software has to take action. That works out to 3.6 uS at a 20MHz clock
rate. Sleeping, scheduling to a different task, taking an interrupt and
then switching back to this task will likely not be faster than that.
At lower clock rates, it would make more sense, but it adds complexity
to the driver. We can always revisit this decision if it proves to be a
problem.
David Daney
next prev parent reply other threads:[~2012-05-14 18:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 21:34 [PATCH 0/2] MIPS/spi: New driver for SPI master controller for OCTEON SOCs David Daney
[not found] ` <1336772086-17248-1-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-05-11 21:34 ` [PATCH 1/2] MIPS: OCTEON: Add register definitions for SPI host hardware David Daney
2012-05-14 20:02 ` Linus Walleij
[not found] ` <1336772086-17248-2-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-05-20 5:23 ` Grant Likely
2012-05-11 21:34 ` [PATCH 2/2] spi: Add SPI master controller for OCTEON SOCs David Daney
2012-05-14 5:46 ` Shubhrajyoti Datta
2012-05-14 18:13 ` David Daney [this message]
2012-05-20 5:26 ` Grant Likely
[not found] ` <1336772086-17248-3-git-send-email-ddaney.cavm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-05-14 20:07 ` Linus Walleij
2012-08-21 19:49 ` [2/2] " Guenter Roeck
2012-08-21 20:38 ` David Daney
2012-05-20 5:46 ` [PATCH 2/2] " Grant Likely
2012-08-21 19:30 ` David Daney
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=4FB14B55.4070604@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=omaplinuxkernel@gmail.com \
--cc=rob.herring@calxeda.com \
--cc=spi-devel-general@lists.sourceforge.net \
/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).