From: Mark Brown <broonie@kernel.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-xtensa@linux-xtensa.org, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Chris Zankel <chris@zankel.net>, Marc Gauthier <marc@cadence.com>,
Rob Herring <robh+dt@kernel.org>,
Grant Likely <grant.likely@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v2 1/3] spi: add xtfpga SPI controller driver
Date: Wed, 12 Mar 2014 12:49:01 +0000 [thread overview]
Message-ID: <20140312124901.GQ28112@sirena.org.uk> (raw)
In-Reply-To: <1394626865-15105-2-git-send-email-jcmvbkbc@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 659 bytes --]
On Wed, Mar 12, 2014 at 04:21:03PM +0400, Max Filippov wrote:
> + case 16:
> + /* Bytes that should go out earlier have lower addresses,
> + * but the hardware operates with 16 bit words and transmits
> + * higher bits first. Thus data in memory is in BE order.
> + */
> + xspi->data = (xspi->data << 16) | be16_to_cpu(v);
> + xspi->data_sz += 2;
> + break;
Are you sure you need to do this byte swap? SPI words are big endian so
if you are running on a little endian processor if you are transmitting
16 bit words you should see the data getting swapped on the bus (this is
why I say you should never have more than 8 bits per word for regmap).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-03-12 12:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 12:21 [PATCH v2 0/3] xtensa xtfpga SPI controller driver Max Filippov
2014-03-12 12:21 ` [PATCH v2 1/3] spi: add " Max Filippov
2014-03-12 12:49 ` Mark Brown [this message]
2014-03-12 17:13 ` Max Filippov
2014-03-12 12:21 ` [PATCH v2 2/3] spi/xtensa-xtfpga: add DT binding documentation Max Filippov
2014-03-12 15:13 ` Mark Rutland
2014-03-12 17:21 ` Max Filippov
2014-03-12 12:21 ` [PATCH v2 3/3] MAINTAINERS: add xtfpga platform section Max Filippov
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=20140312124901.GQ28112@sirena.org.uk \
--to=broonie@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=chris@zankel.net \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=jcmvbkbc@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=marc@cadence.com \
--cc=robh+dt@kernel.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