public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Herbrechtsmeier <hbmeier@hni.uni-paderborn.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Removed compiler issue (invalid lvalue) -	CPU PXA270
Date: Tue, 8 Jan 2008 13:59:19 +0000 (UTC)	[thread overview]
Message-ID: <loom.20080108T134358-947@post.gmane.org> (raw)
In-Reply-To: 46D72D2F.4020601@denx.de

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

  parent reply	other threads:[~2008-01-08 13:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20080108T134358-947@post.gmane.org \
    --to=hbmeier@hni.uni-paderborn.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox