[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FB14B55.4070604@gmail.com>
Date: Mon, 14 May 2012 11:13:41 -0700
From: David Daney <ddaney.cavm@...il.com>
To: Shubhrajyoti Datta <omaplinuxkernel@...il.com>
CC: David Daney <ddaney.cavm@...il.com>,
devicetree-discuss@...ts.ozlabs.org,
Grant Likely <grant.likely@...retlab.ca>,
Rob Herring <rob.herring@...xeda.com>,
spi-devel-general@...ts.sourceforge.net, linux-mips@...ux-mips.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH 2/2] spi: Add SPI master controller for OCTEON SOCs.
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists