linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Hugues Deschenes <jean-hugues.deschenes-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>
To: Feng Tang <feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: spi-devel-list
	<spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	David Brownell
	<dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [PATCH] spi/dw_spi: add a FIFO depth detection
Date: Thu, 21 Jan 2010 08:07:35 -0500	[thread overview]
Message-ID: <4B585197.10507@octasic.com> (raw)
In-Reply-To: <20100121105139.3d0fbd42@feng-desktop>


Feng Tang wrote:
> +
> +	/*
> +	 * Try to detect the FIFO depth if not set by interface driver,
> +	 * the depth could be from 2 to 256 from HW spec
> +	 */
> +	if (!dws->fifo_len) {
> +		u32 fifo;
> +		for (fifo = 2; fifo <= 257; fifo++) {
> +			dw_writew(dws, txfltr, fifo);
> +			if (fifo != dw_readw(dws, txfltr))
> +				break;
> +		}
> +
> +		dws->fifo_len = (fifo == 257) ? 0 : fifo;
> +		dw_writew(dws, txfltr, 0);
> +	}
>  }
>  
>  int __devinit dw_spi_add_host(struct dw_spi *dws)
>   
Just what I was looking for; thanks!

Acked-by: Jean-Hugues Deschenes <jean-hugues.deschenes-YGVykHU+fedBDgjK7y7TUQ@public.gmane.org>





------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev

  reply	other threads:[~2010-01-21 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21  2:51 [PATCH] spi/dw_spi: add a FIFO depth detection Feng Tang
2010-01-21 13:07 ` Jean-Hugues Deschenes [this message]
2010-01-21 14:49 ` Grant Likely

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=4B585197.10507@octasic.com \
    --to=jean-hugues.deschenes-ygvykhu+fedbdgjk7y7tuq@public.gmane.org \
    --cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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).