From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Configuring U-Boot for MPC8349E in little endian mode
Date: Fri, 02 May 2008 15:30:22 -0500 [thread overview]
Message-ID: <481B79DE.8030905@freescale.com> (raw)
In-Reply-To: <481B7832.5020203@ovro.caltech.edu>
David Hawkins wrote:
> So are you saying you would DMA to a register with a specific
> endianness.
Typically, yes. Theoretically, a device could be programmed to handle any
number of bit- and byte-endianness, but I haven't found one. Most of them time,
it's just a shift register and so which means the bit and the bytes have to be
in the same order. The result is that the endianness of the host processor has
to to match the endianness of the audio samples.
The Freescale SSI has this problem. When the SSI is on an i.MX, it only
supports little-endian samples. On an MPC8610, it only supports big-endian samples.
> The two situations I can think of with a DMA
> controller moving data that requires a specific endianness
> are;
>
> 1) DMA controller scatter-gather descriptor entries.
> These would normally consist of source, destination,
> length, and next pointers in a specific endianness
> format.
I don't think this applies. The descriptor entries are "manually programmed";
that is, you write to individual fields in the descriptor one at a time.
> 2) DMA from memory to a FIFO destination address that expects
> little-endian format 16-bit values.
Yes, this is what audio drivers do.
> In either case, you would use the byte-conversion routines to
> serialize the descriptor entries in memory, or in the source buffer,
> into the correct endianness before performing enabling the DMA.
Very true. However, this means that if the original data is in the wrong
endian, you have to have a middle layer that modifies the data when copying from
the source buffer to the DMA buffer. This adds overhead.
> If Vivek's application correctly serializes any endian-specific
> data before using the MPC8349EA DMA controller, then he should
> have no issues.
Yes, but it may take him weeks to find all the places in the where the
endianness matters.
> Does an audio driver differ in any respect to the above situations?
Not really.
--
Timur Tabi
Linux kernel developer at Freescale
next prev parent reply other threads:[~2008-05-02 20:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 15:34 [U-Boot-Users] Configuring U-Boot for MPC8349E in little endian mode vivek.trivedi at wipro.com
2008-04-30 15:45 ` Wolfgang Denk
2008-04-30 22:13 ` David Hawkins
2008-05-02 6:14 ` vivek.trivedi at wipro.com
2008-05-02 7:22 ` Kumar Gala
2008-05-02 12:38 ` Jerry Van Baren
2008-05-02 16:35 ` David Hawkins
2008-05-02 9:19 ` vivek.trivedi at wipro.com
2008-05-02 14:34 ` Timur Tabi
2008-05-02 16:52 ` David Hawkins
2008-05-02 19:47 ` Timur Tabi
2008-05-02 20:23 ` David Hawkins
2008-05-02 20:30 ` Timur Tabi [this message]
2008-05-02 21:48 ` David Hawkins
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=481B79DE.8030905@freescale.com \
--to=timur@freescale.com \
--cc=u-boot@lists.denx.de \
/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