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

2009-07-23 Thread Ben Warren
Wolfgang Denk wrote: > Dear Matthias Weisser, > > In message > <1248250473-12694-1-git-send-email-matthias.weis...@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*)ad

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

2009-07-23 Thread Wolfgang Denk
Dear Matthias Weisser, In message <1248250473-12694-1-git-send-email-matthias.weis...@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 syste

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

2009-07-22 Thread Mike Frysinger
On Wednesday 22 July 2009 04:14:33 Matthias Weisser wrote: > static inline u32 smc911x_reg_read(u32 addr) > { > - volatile u16 *addr_16 = (u16 *)addr; > - return ((*addr_16 & 0x) | (*(addr_16 + 1) << 16)); > + u32 res; > + > + res = readw(addr) & 0x; > + res |= ((u

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

2009-07-22 Thread Matthias Weisser
Volatile pointer usage caused lockup with arm-gcc 4.3.2 Using I/O accessor fixed that. Signed-off-by: Matthias Weisser --- drivers/net/smc911x.h | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index 80d2ce0..