[U-Boot] [PATCH] Using I/O accessor instead of volatile pointers in SMC911x driver

Wolfgang Denk wd at denx.de
Thu Jul 23 21:54:22 CEST 2009


Dear Matthias Weisser,

In message <1248250473-12694-1-git-send-email-matthias.weisser at 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.

Is this intentional? Has your patch been tested on both BE and LE
systems?

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
Dear Lord: I just want *one* one-armed manager so  I  never  have  to
hear "On the other hand", again.


More information about the U-Boot mailing list