From: "Markus Klotzbücher" <mk@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Setting processor endianess for USB modules
Date: Wed, 30 Apr 2008 10:34:11 +0200 [thread overview]
Message-ID: <878wyvvj0c.fsf@denx.de> (raw)
In-Reply-To: <48177904.16185.58C770@ceggers.gmx.de> (Christian Eggers's message of "Tue\, 29 Apr 2008 19\:37\:40 +0200")
Dear Christian,
"Christian Eggers" <ceggers@gmx.de> writes:
> I've recognized that a lot of USB code in U-Boot uses the macros
> swap_16() and swap_32() which are defined in usb.h. The behaviour
> of the macros is controlled by the define LITTLEENDIAN.
>
> Is there a good reason NOT to use the macros provided in
> asm/byteorder.h (as in the appropriate code in Linux-2.4 )?
Largely not. But be carefull. Besides big and little endian CPUs we also
have controllers that operate in big or little endian (see
CFG_OHCI_BE_CONTROLLER), and then there are PCI controllers whose
registers need to be accessed as little endian
(CFG_OHCI_SWAP_REG_ACCESS).
But your right, there is no real for LITTLEENDIAN.
> I think that switching to these functions might be useful in order
> to eliminate the need to use the LITTLEENDIAN define for
> specifying the byteorder. It seems that LITTLEENDIAN is not
> used outside the USB code.
Right. Patches cleaning this up are more than welcome! Please note that
cleaning up USB drivers under the cpu/ directory is a waste of time
though. Boards using these drivers should be converted to use the
generic infrastructure in drivers/usb/ instead.
Best regards
Markus Klotzbuecher
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
next prev parent reply other threads:[~2008-04-30 8:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 17:37 [U-Boot-Users] Setting processor endianess for USB modules Christian Eggers
2008-04-30 8:34 ` Markus Klotzbücher [this message]
2008-05-21 18:58 ` Christian Eggers
2008-05-21 19:23 ` Wolfgang Denk
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=878wyvvj0c.fsf@denx.de \
--to=mk@denx.de \
--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