[U-Boot-Users] [PATCH] Removed compiler issue (invalid lvalue) - CPU PXA270

Code is broken for PXA270 due to "invalid lvalue in assignment".
This patch fix it in pxa-regs.h
Signed-off-by: Stefano Babic sbabic@denx.de

In message 46D72D2F.4020601@denx.de you wrote:
This is a multi-part message in MIME format. --------------030401040309070602030800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit
Code is broken for PXA270 due to "invalid lvalue in assignment".
This patch fix it in pxa-regs.h
Signed-off-by: Stefano Babic sbabic@denx.de
Applied, thanks.
Best regards,
Wolfgang Denk

stefano babic <sbabic <at> 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 <sbabic <at> 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

Stefan Herbrechtsmeier wrote:
The real bug can be fixed by using the old style with pointer / address (from the linux kernel)
You are right and a patch was already sent to fix this problem, only at a wrong time and was not accepted (you find it in the list with the subject "Fix gcc issues in pxa-regs.h"). It contains the same solution as in Kernel. I forget to re-submit the patch, sorry.
Wolfgang has already confirmed to me that he will integrate this patch.
stefano
participants (3)
-
Stefan Herbrechtsmeier
-
stefano babic
-
Wolfgang Denk