X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=include%2Fasm-arm%2Farch-pxa%2Fhardware.h;h=72b04d846a231bb473e4986f05276f6d399ff2fe;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=127fc1af12c0f45b06fbeaf7573d82c373299b02;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index 127fc1af1..72b04d846 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h @@ -59,10 +59,9 @@ typedef struct { volatile u32 offset[4096]; } __regbase; # define __REG(x) __REGP(io_p2v(x)) #endif -/* Let's kick gcc's ass again... */ -# define __REG2(x,y) \ - ( __builtin_constant_p(y) ? (__REG((x) + (y))) \ - : (*(volatile u32 *)((u32)&__REG(x) + (y))) ) +/* With indexed regs we don't want to feed the index through io_p2v() + especially if it is a variable, otherwise horrible code will result. */ +# define __REG2(x,y) (*(volatile u32 *)((u32)&__REG(x) + (y))) # define __PREG(x) (io_v2p((u32)&(x))) @@ -73,8 +72,6 @@ typedef struct { volatile u32 offset[4096]; } __regbase; #endif -#include "pxa-regs.h" - #ifndef __ASSEMBLY__ /*