From: Juergen Beisert <jbe@pengutronix.de>
To: linuxppc-dev@ozlabs.org
Cc: Henk Stegeman <henk.stegeman@gmail.com>
Subject: Re: Davicom DM9000A on MPC5200B (powerpc) works using a dirty offsetting and byte trick
Date: Sat, 7 Mar 2009 11:09:48 +0100 [thread overview]
Message-ID: <200903071109.49726.jbe@pengutronix.de> (raw)
In-Reply-To: <ae4f76fd0902200151m461f9336x1e2bbec61f815fde@mail.gmail.com>
Henk,
On Freitag, 20. Februar 2009, Henk Stegeman wrote:
> - Any suggestions to what could be wrong here? Or does the MPC5200 in
> this case only byte swap u16 reads, but a u8 read is unchanged?
You should not follow the Freescale bus signal names when you connect your
external little endian device. Otherwise the offsets are always wrong.
Do it in this way instead:
MPC LE Device
D[0..7] <-> D[24..31]
D[8..15] <-> D[16..23]
D[16..23] <-> D[8..15]
D[24..31] <-> D[0..7]
If you connect your device in such a way, just enable CS's byte swap feature
depending on your bus size and you are done (no additional software
manipulation required). Now you can write bytes, words or longs and you will
always write the correct data into the corresponding device register.
Hope it helps
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-8766-939 228 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2009-03-07 10:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-20 9:51 Davicom DM9000A on MPC5200B (powerpc) works using a dirty offsetting and byte trick Henk Stegeman
2009-03-06 15:02 ` Grant Likely
2009-03-07 10:09 ` Juergen Beisert [this message]
2009-03-09 9:32 ` Henk Stegeman
2009-03-09 11:09 ` Juergen Beisert
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=200903071109.49726.jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=henk.stegeman@gmail.com \
--cc=linuxppc-dev@ozlabs.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).