From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V4 09/11] ARM/PPC: add a common way to access registers
Date: Fri, 29 Jan 2010 12:28:21 +0100 [thread overview]
Message-ID: <4B62C655.3090707@denx.de> (raw)
In-Reply-To: <20100126150221.5049E3F6C0@gemini.denx.de>
Wolfgang Denk wrote:
> Dear Stefano,
>
Hi Wolfgang,
> could you _please_ provide sufficient "References:" and "In-reply-to:"
> headers with your messages, so threading is working? You are using
> git-send-email so this is really simple - just enter the respective
> message ID when it asks
>
> Message-ID to be used as In-Reply-To for the first email?
Sorry for that.
> In my first comment I wrote:
>
> | Please document these new macros. Please be explicit about the
> | behaviour of these macros on systems with different endianess.
>
> This is still missing.
>
> We need an entry in the README or even better some new
> "doc/README.io_accessors" or similar, which lists the new macros and
> their intended use and interface.
>
> This file should also document the behaviour of these macros on big
> endian and little endian machines.
I understand what you mean and I come now to a slightly different
solution as what you have proposed. Really my patches drop the endianess
(that is explicitely set in the actual fsl_esdhc driver) and generate
the confusion you reported. Probably, even if I add a better
documentation, it remains unclear which is the endianess used.
Another possibility will be to explicitely set the endianess with a
CONFIG_ when it is needed.
I found that in u-boot there is already a solution like this (for USB):
CONFIG_EHCI_DESC_BIG_ENDIAN
My proposal will be:
In the accessors (io.h), I will add all requested macros for both
endianess (clrbits_le32,clrbits_be32, setbits_be32,...) for the arm
architecture as you proposed. It seems there is no need to change the
accessors for powerpc. I have to drop the "implicite" endianess I set
(for example, when I set clrsetbits32 as big endian for powerpc and
little endian for arm), source of confusion.
Probably I do not need in this case to write any additional
documentation because the endianess is explicitely set and IMHO is self
explained.
I will add something like CONFIG_FSL_ESDHC_BIG_ENDIAN or
CONFIG_FSL_ESDHC_LITTLE_ENDIAN in the driver I changed. In the related
header file for the driver, I can set driver specific macros that point
to the correct accessors, depending on the new CONFIG_ switch.
Then it should be clear which is the endianess used and it will be not
related to the processor architecture. What do you think about this ?
Best regards,
Stefano Babic
--
=====================================================================
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:[~2010-01-29 11:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-26 13:43 [U-Boot] [PATCH V4 09/11] ARM/PPC: add a common way to access registers Stefano Babic
2010-01-26 15:02 ` Wolfgang Denk
2010-01-29 11:28 ` Stefano Babic [this message]
2010-02-03 19:53 ` Wolfgang Denk
2010-02-04 9:43 ` Stefano Babic
2010-02-04 10:34 ` Wolfgang Denk
2010-02-04 16:57 ` Scott Wood
2010-02-05 13:05 ` Stefano Babic
2010-02-05 16:52 ` Scott Wood
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=4B62C655.3090707@denx.de \
--to=sbabic@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 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.