All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: uclinux-dist-devel@blackfin.uclinux.org,
	alsa-devel@alsa-project.org, Mike Frysinger <vapier@gentoo.org>,
	device-drivers-devel@blackfin.uclinux.org,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [uclinux-dist-devel] [PATCH 1/4] Blackfin: Use 8bit spi transfers for the ad1836
Date: Fri, 6 May 2011 14:26:08 +0100	[thread overview]
Message-ID: <20110506132608.GO23729@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4DC3F577.2040206@metafoo.de>

On Fri, May 06, 2011 at 03:19:51PM +0200, Lars-Peter Clausen wrote:
> On 05/06/2011 02:48 PM, Mark Brown wrote:

> > So clearly the cache stuff ought to be using cpu_to_be16 for this stuff.
> > At present we've been lazy about this as on most CPUs the swap boils
> > down to a noop.  If we do end up needing both swaps then we just add
> > this as another parameter in the cache infrastructure.

> Currently everything is stored as big endian.

What do you mean?  The cache is CPU native.

> The easiest way to support 16-bit spi writes on little endian systems, would be
> to add a do_spi_write16 which would be used for those devices. On big-endian
> systems it would be an alias to do_spi_write, on litte-endian systems it would
> perform a byte swap on the buffer.

> An alternative would be to provide litte-endian versions of snd_soc_x_y_write.
> This would amount to more code, but less runtime overhead since we can store it
> in litte-endian format right away instead of having to swap the bytes.

This would also support bulk operations direct from cache.

Either of these would be an example of using cpu_to_() as I suggested.

  reply	other threads:[~2011-05-06 13:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05 17:52 [PATCH 1/4] Blackfin: Use 8bit spi transfers for the ad1836 Lars-Peter Clausen
2011-05-05 17:52 ` [PATCH 2/4] ASoC: Do not swap upper and lower byte in snd_soc_4_12_spi_write Lars-Peter Clausen
2011-05-05 17:52 ` [PATCH 3/4] ASoC: Get rid of snd_soc_*_*_spi_write wrapper functions Lars-Peter Clausen
2011-05-12 12:25   ` Barry Song
2011-05-05 17:52 ` [PATCH 4/4] ASoC: Use spi_write in do_spi_write Lars-Peter Clausen
2011-05-05 22:56 ` [uclinux-dist-devel] [PATCH 1/4] Blackfin: Use 8bit spi transfers for the ad1836 Mike Frysinger
2011-05-06 12:28   ` Lars-Peter Clausen
2011-05-06 12:48     ` Mark Brown
2011-05-06 13:12       ` [Device-drivers-devel] " Mike Frysinger
2011-05-06 13:19       ` Lars-Peter Clausen
2011-05-06 13:26         ` Mark Brown [this message]
2011-05-06 13:31           ` Lars-Peter Clausen

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=20110506132608.GO23729@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=lars@metafoo.de \
    --cc=lrg@slimlogic.co.uk \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier@gentoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.