LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
To: hskinnemoen@atmel.com
Cc: david-b@pacbell.net, spi-devel-general@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: atmel_spi clock polarity
Date: Mon, 18 Feb 2008 23:12:43 +0900 (JST)	[thread overview]
Message-ID: <20080218.231243.41197917.anemo@mba.ocn.ne.jp> (raw)
In-Reply-To: <20080218124237.0b5f701c@dhcp-252-066.norway.atmel.com>

On Mon, 18 Feb 2008 12:42:37 +0100, Haavard Skinnemoen <hskinnemoen@atmel.com> wrote:
> > Here is my quick workaround for this problem.  It makes all CSRn.CPOL
> > match for the transfer before activating chipselect.  I'm not quite
> > sure my analysis is correct, and there might be better solution.
> > Could you give me any comments?
> 
> I'm not sure if I fully understand what problem you're seeing. Is the
> clock state wrong when the chip select is activated?

Yes.

> If so, does the patch below help?

Hmm... It might fix my problem.  But IIRC the clock state follows
CSRn.CPOL just before the real transfer.  Like this (previous transfer
was MODE 0, new transfer is MODE 3):

           T0                T1 T2

CS      ~~~|________________________________________________

CLK     ______________________|~|___|~~~|___|~~~|___|~~~|___

SO      ~~~~~~~~~~~~~~~~~~~~~~~~~~|___|~~~|___|~~~|___|~~~|_
                                   MSB

T0-T1 was relatively longer then T1-T2.  I suppose T1 is not the
point of updating MR register, but the point of starting DMA transfer.

Anyway, I will try your patch in a few days.

---
Atsushi Nemoto

  reply	other threads:[~2008-02-18 14:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-16 13:32 Atsushi Nemoto
2008-02-18 11:42 ` Haavard Skinnemoen
2008-02-18 14:12   ` Atsushi Nemoto [this message]
2008-02-18 14:31     ` Haavard Skinnemoen
2008-02-20  5:21       ` Atsushi Nemoto
2008-02-20  9:34         ` Haavard Skinnemoen
2008-02-20  9:50           ` Atsushi Nemoto
2008-02-21  1:33             ` David Brownell
2008-02-21  1:32           ` David Brownell
2008-02-18 19:57     ` [spi-devel-general] " David Brownell
2008-02-18 22:49       ` Haavard Skinnemoen
2008-02-19 14:51         ` Atsushi Nemoto

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=20080218.231243.41197917.anemo@mba.ocn.ne.jp \
    --to=anemo@mba.ocn.ne.jp \
    --cc=david-b@pacbell.net \
    --cc=hskinnemoen@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    --subject='Re: atmel_spi clock polarity' \
    /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

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).