From: Stefan Herbrechtsmeier Date: Wed, 09 Jan 2008 12:27:42 +0100 Subject: [U-Boot-Users] [PATCH] Removed compiler issue (invalid lvalue) - CPU PXA270 Message-ID: <4784AFAE.3080505@hni.uni-paderborn.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de stefano babic denx.de> writes: > > Code is broken for PXA270 due to "invalid lvalue in assignment". > > This patch fix it in pxa-regs.h > > Signed-off-by: Stefano Babic denx.de> > This Patch makes wrong calculation! The real bug can be fixed by using the old style with pointer / address (from the linux kernel) #define GPLR(x) (*((((x) & 0x7f) < 96) ? &_GPLR(x) : &GPLR3)) or by fixing the calculation #define GPLR(x) __REG2(0x40E00000, (((x) & 0x7f) < 96) ? ((x) & 0x60) >> 3 : 0x100) Which is the preferred way? Stefan