LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Haavard Skinnemoen <hskinnemoen@atmel.com>
To: David Brownell <david-b@pacbell.net>
Cc: spi-devel-general@lists.sourceforge.net,
	Atsushi Nemoto <anemo@mba.ocn.ne.jp>,
	linux-kernel@vger.kernel.org
Subject: Re: [spi-devel-general] atmel_spi clock polarity
Date: Mon, 18 Feb 2008 23:49:18 +0100	[thread overview]
Message-ID: <20080218234918.3d09022a@siona> (raw)
In-Reply-To: <200802181157.57299.david-b@pacbell.net>

On Mon, 18 Feb 2008 11:57:56 -0800
David Brownell <david-b@pacbell.net> wrote:

> On Monday 18 February 2008, Atsushi Nemoto wrote:
> > 	 IIRC the clock state follows
> > CSRn.CPOL just before the real transfer.
> 
> No ... clock state should be valid *before* chipselect goes
> active.  So I'm thinking the patch from Haavard is likely
> the right change.

Hopefully it is...

> > CLK     ______________________|~|___|~~~|___|~~~|___|~~~|___
> 
> ... and at T1 CPOL is changed??  That's wrong.  There should
> never be a partial clock period while a chipselect is active.
> While it's inactive, sure -- no chip should care.

...but what I'm afraid of is that since we're using GPIO chipselects,
the controller may _think_ that no chip is selected and change the
clock polarity just before it would pull the chipselect low if we were
using automatic chipselects...

If that's the case, it would be a bit strange if it actually helped to
initialize all the CSRn registers, but it would also offer us a nice
workaround...

Atsushi, do you by any chance have debugging enabled? That would
explain the long delay from CS activation to the change of clock
polarity. Compared to printk() the DMA setup takes almost no time at
all.

If you can confirm that my patch helps, I think that's the one we want
in mainline.

Haavard

  reply	other threads:[~2008-02-18 22:49 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
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 [this message]
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=20080218234918.3d09022a@siona \
    --to=hskinnemoen@atmel.com \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    --subject='Re: [spi-devel-general] 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).