From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] mpc85xx: fix upmconfig
Date: Wed, 16 Jul 2008 13:15:17 +0200 [thread overview]
Message-ID: <m27ibm6px6.fsf@ohwell.denx.de> (raw)
In-Reply-To: <20080710123642.GB28927@Chamillionaire.breakpoint.cc> (Sebastian Siewior's message of "Thu, 10 Jul 2008 14:36:42 +0200")
Hi,
> This actually shouldn't work. Imagina 0xf0000000 base address that
> gets translated into 0x1e000 and causes my box to hang. Writing
> to 0xf0000000 seems the better way.
> Also don't compare against the UPM mask but agaist the MSEL mask.
>
> Cc: Sergei Poselenov <sposelenov@emcraft.com>
> Cc: Andy Fleming <afleming@freescale.com>
> Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
> ---
> cpu/mpc85xx/cpu.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c
> index 0497422..2373b4a 100644
> --- a/cpu/mpc85xx/cpu.c
> +++ b/cpu/mpc85xx/cpu.c
> @@ -71,8 +71,7 @@ struct cpu_type *identify_cpu(u32 ver)
>
> static void set_lcb_clock(uint clkdiv)
> {
> - volatile immap_t *immap = (immap_t *)CFG_IMMR;
> - volatile ccsr_lbc_t *lbc= &immap->im_lbc;
> + volatile ccsr_lbc_t *lbc = (void *)(CFG_MPC85xx_LBC_ADDR);
> uint lcrr;
>
> lcrr = lbc->lcrr;
This hunk does not apply for me, but the next one unbreaks the socrates
board, so
> @@ -352,8 +351,8 @@ void upmconfig (uint upm, uint * table, uint size)
> i++, brp += 2, orp += 2) {
>
> /* Look for a valid BR with selected UPM */
> - if ((in_be32(brp) & (BR_V | upmmask)) == (BR_V | upmmask)) {
> - dummy = (volatile u8*)(in_be32(brp) >> BR_BA_SHIFT);
> + if ((in_be32(brp) & (BR_V | BR_MSEL)) == (BR_V | upmmask)) {
> + dummy = (volatile u8*)(in_be32(brp) & BR_BA);
> break;
> }
> }
Acked-by: Detlev Zundel <dzu@denx.de>
Cheers
Detlev
--
error compiling committee.c: too many arguments to function
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
prev parent reply other threads:[~2008-07-16 11:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 12:36 [U-Boot-Users] [PATCH] mpc85xx: fix upmconfig Sebastian Siewior
2008-07-15 0:32 ` Andy Fleming
2008-07-15 8:49 ` Sebastian Siewior
2008-07-29 13:23 ` Wolfgang Denk
2008-07-16 11:15 ` Detlev Zundel [this message]
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=m27ibm6px6.fsf@ohwell.denx.de \
--to=dzu@denx.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