public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Using I/O accessor instead of volatile pointers in SMC911x driver
Date: Thu, 23 Jul 2009 14:25:34 -0700	[thread overview]
Message-ID: <4A68D54E.3060902@gmail.com> (raw)
In-Reply-To: <20090723195422.8E91F832E416@gemini.denx.de>

Wolfgang Denk wrote:
> Dear Matthias Weisser,
>
> In message <1248250473-12694-1-git-send-email-matthias.weisser@graf-syteco.de> you wrote:
>   
>> Volatile pointer usage caused lockup with arm-gcc 4.3.2
>> Using I/O accessor fixed that.
>>     
>
> Hm...
>
>   
>> -	return *(volatile u32*)addr;
>> +	return readl(addr);
>>     
>
> On big-endian systems like PowerPC, readl() is a byte-swapping
> (little-endian) input function, which means that your patch changes
> the byte order of all I/O operations.
>
>   
Yeah, that's why I left these alone when re-working this driver.  I 
don't know what the correct approach is when using memory-mapped devices 
that could in theory go on the local bus of any processor.  Most people 
I know would hook them up according to the native endianness.

regards,
Ben

      reply	other threads:[~2009-07-23 21:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-22  8:14 [U-Boot] [PATCH] Using I/O accessor instead of volatile pointers in SMC911x driver Matthias Weisser
2009-07-22  8:32 ` Mike Frysinger
2009-07-23 19:54 ` Wolfgang Denk
2009-07-23 21:25   ` Ben Warren [this message]

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=4A68D54E.3060902@gmail.com \
    --to=biggerbadderben@gmail.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