[U-Boot] [PATCH] post: fix up I/O helper usage

Wolfgang Denk wd at denx.de
Tue Jul 26 16:43:40 CEST 2011


Dear Mike Frysinger,

In message <1304996478-1536-1-git-send-email-vapier at gentoo.org> you wrote:
> The I/O API from Linux defaults to little endian accesses.  In order to
> do big endian accesses, there are a "be" variants.  The "le32" variants
> are arch-specific and not terribly common, so change it to the normal
> Linux API funcs.
> 
> Signed-off-by: Mike Frysinger <vapier at gentoo.org>
> ---
>  include/post.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/post.h b/include/post.h
> index 519cef1..c9ec2f4 100644
> --- a/include/post.h
> +++ b/include/post.h
> @@ -78,12 +78,12 @@
>  
>  static inline ulong post_word_load (void)
>  {
> -	return in_le32((volatile void *)(_POST_WORD_ADDR));
> +	return inl((volatile void *)(_POST_WORD_ADDR));
>  }

Is this supposed to fix any real problem, or just a change according
to your personal preferences?

My initial impression is that we lose a bit of documentation
(explicitely telling the reader that these are LE accesses has a
certain benefit over hoping the reader has this information present).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Heavier than air flying machines are impossible.
                    -- Lord Kelvin, President, Royal Society, c. 1895


More information about the U-Boot mailing list