From: Stefan Herbrechtsmeier Date: Tue, 8 Jan 2008 13:59:19 +0000 (UTC) Subject: [U-Boot-Users] =?utf-8?q?=5BPATCH=5D_Removed_compiler_issue_=28in?= =?utf-8?q?valid_lvalue=29_-=09CPU_PXA270?= References: <46D72D2F.4020601@denx.de> Message-ID: 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