linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ned Forrester <nforrester-/d+BM93fTQY@public.gmane.org>
To: Vernon Sauder <vernoninhand-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: pxa2xx_spi with SFRM
Date: Tue, 19 Aug 2008 20:59:59 -0400	[thread overview]
Message-ID: <48AB6C8F.4040408@whoi.edu> (raw)
In-Reply-To: <48A9C0D0.5050304-/d+BM93fTQY@public.gmane.org>

Ned Forrester wrote:
> Vernon Sauder wrote:
>> <opinion> As a user, it would seem that the SSP should work with
>> minimum fuss. If there are values that enable 99% of devices to work,
>> then why would you *not* want them to be the defaults? If the user
>> needs to tweak the values because they need more performance, then they
>> can. But if they only need a low bandwidth connection, causing
>> transfers to hang because they did not provide a "know-able" value
>> seems less than useful. I know it took me entirely too long to get this
>> working. I am only trying to help the next user that needs this.
>> </opinion>
> 
> I agree with your sentiment.  What I am not sure of is whether there are
> even 90% of applications that could use a single group of settings.  I
> think the DMA burst and the thresholds could likely be set to reasonable
> defaults: burst = bits/word (for 8, 16, and 32 bit words, this results
> in burst equaling half the FIFO), and thresholds of 8/8 (again, half the
> FIFO).  For the timeout, I'm less sure of the best approach; probably it
> should be very long, a millisecond or more (if we know what that
> translates to on a PXA270), and let users reduce it if they want faster
> response.  My main concern is the poor documentation of this in the PXA
> developer's manuals.

Vernon, have you had any more thoughts about this.  I am working on a
patch to deal with problems that were discovered a while ago, and which
finally tripped up another user (Re: [spi-devel-general] [PATCH]
pxa2xx_spi: wait_rx_stall before deasserting CS on PIO mode).  I
wondered if we are ready to converge on any changes.  On the one hand it
would be easy to throw improvement in the defaults in the with the other
changes, but on the other hand I think they are independent, and so they
should probably be in separate patches.

As a consequence of studying the driver for the other patch (regarding
transfer delays and chip select), I have a new understanding of the
timeout that simplifies the problems I discussed above.  I am now
reasonably sure (but cannot test) that a timeout value that is "too
short" will only result in excess interrupt service for unneeded
timeouts, and not in early termination of a transfer.  In
interrupt_transfer, acceptance of a timeout interrupt is conditioned on
being able to retrieve all expected characters from the RX FIFO; in
dma_transfer, acceptance is similarly conditioned on the whole transmit
process being complete (and thus the receive process is done or will be
in nsec).

The result is that neither a too short, nor a too long timeout is fatal,
and thus it IS reasonable to more firmly establish a default timeout,
even it is short.

-- 
Ned Forrester                                       nforrester-/d+BM93fTQY@public.gmane.org
Oceanographic Systems Lab                                  508-289-2226
Applied Ocean Physics and Engineering Dept.
Woods Hole Oceanographic Institution          Woods Hole, MA 02543, USA
http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212
http://www.whoi.edu/hpb/Site.do?id=1532
http://www.whoi.edu/page.do?pid=10079


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

  parent reply	other threads:[~2008-08-20  0:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08  8:02 pxa2xx_spi with SFRM nforrester-/d+BM93fTQY
     [not found] ` <1218182539.489bfd8b24a3d-2RFepEojUI3934Ez3d9NBg@public.gmane.org>
2008-08-08 10:08   ` Jonathan Cameron
     [not found]     ` <489C1B23.6040804-KWPb1pKIrIJaa/9Udqfwiw@public.gmane.org>
2008-08-11 22:55       ` Vernon Sauder
     [not found]         ` <48A0C35D.5010606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-08-14 15:29           ` Ned Forrester
     [not found]             ` <48A44F77.1020908-/d+BM93fTQY@public.gmane.org>
2008-08-15  2:44               ` Vernon Sauder
     [not found]                 ` <48A4ED85.1030803-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-08-15 19:01                   ` Limitations on transfer length [was: pxa2xx_spi with SFRM] Ned Forrester
     [not found]                     ` <48A5D272.1070804-/d+BM93fTQY@public.gmane.org>
2008-09-08 22:42                       ` David Brownell
2008-10-24  5:11                       ` Vernon Sauder
     [not found]                         ` <490158E8.8060502-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2008-11-13  1:31                           ` Ned Forrester
2008-08-15 19:09                   ` pxa2xx_spi with SFRM Ned Forrester
     [not found]                     ` <48A5D44D.6040106-/d+BM93fTQY@public.gmane.org>
2008-08-16  2:33                       ` Vernon Sauder
     [not found]                         ` <20080815223307.02db86aa-W37fpRALFaH6NKmgiXY+hA0JkcsJGQge@public.gmane.org>
2008-08-18 18:34                           ` Ned Forrester
     [not found]                             ` <48A9C0D0.5050304-/d+BM93fTQY@public.gmane.org>
2008-08-20  0:59                               ` Ned Forrester [this message]
     [not found]                                 ` <48AB6C8F.4040408-/d+BM93fTQY@public.gmane.org>
2008-08-21 22:08                                   ` Vernon Sauder
     [not found]                                     ` <20080821180826.491ac70b-W37fpRALFaH6NKmgiXY+hA0JkcsJGQge@public.gmane.org>
2008-08-23  3:23                                       ` Ned Forrester
     [not found]                                         ` <48AF82B3.8040709-/d+BM93fTQY@public.gmane.org>
2008-08-29 19:18                                           ` Vernon Sauder
     [not found]                                             ` <20080829151839.7a85e7d6-W37fpRALFaH6NKmgiXY+hA0JkcsJGQge@public.gmane.org>
2008-08-30  3:07                                               ` Ned Forrester
2008-09-08 22:50                           ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2008-08-07 18:03 Vernon Sauder

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=48AB6C8F.4040408@whoi.edu \
    --to=nforrester-/d+bm93ftqy@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=vernoninhand-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).