public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Removed compiler issue (invalid lvalue) - CPU PXA270
@ 2007-08-30 20:48 stefano babic
  2007-09-06 23:03 ` Wolfgang Denk
  2008-01-08 13:59 ` Stefan Herbrechtsmeier
  0 siblings, 2 replies; 7+ messages in thread
From: stefano babic @ 2007-08-30 20:48 UTC (permalink / raw)
  To: u-boot

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>


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0005-Removed-compiler-issue-invalid-lvalue.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20070830/f9235461/attachment.txt 

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [U-Boot-Users] [PATCH] Removed compiler issue (invalid lvalue) - CPU PXA270
@ 2008-01-09 11:27 Stefan Herbrechtsmeier
  2008-01-09 12:40 ` Wolfgang Denk
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Herbrechtsmeier @ 2008-01-09 11:27 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-09 13:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-30 20:48 [U-Boot-Users] [PATCH] Removed compiler issue (invalid lvalue) - CPU PXA270 stefano babic
2007-09-06 23:03 ` Wolfgang Denk
2008-01-08 13:59 ` Stefan Herbrechtsmeier
2008-01-09 12:32   ` stefano babic
  -- strict thread matches above, loose matches on Subject: below --
2008-01-09 11:27 Stefan Herbrechtsmeier
2008-01-09 12:40 ` Wolfgang Denk
2008-01-09 13:00   ` Stefan Herbrechtsmeier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox