From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] 86xx: Report which "bank" of NOR flash we are booting from on MPC8641HPCN
Date: Tue, 21 Jul 2009 17:11:05 +0200 [thread overview]
Message-ID: <200907211711.05122.sr@denx.de> (raw)
In-Reply-To: <20090721150556.DC74C832E416@gemini.denx.de>
On Tuesday 21 July 2009 17:05:56 Wolfgang Denk wrote:
> > int checkboard(void)
> > {
> > - printf ("Board: MPC8641HPCN, System ID: 0x%02x, "
> > - "System Version: 0x%02x, FPGA Version: 0x%02x\n",
> > + u8 vboot;
> > +
> > + printf ("Board: MPC8641HPCN, Sys ID: 0x%02x, "
> > + "Sys Ver: 0x%02x, FPGA Ver: 0x%02x, ",
> > in8(PIXIS_BASE + PIXIS_ID), in8(PIXIS_BASE + PIXIS_VER),
> > in8(PIXIS_BASE + PIXIS_PVER));
> > +
> > + vboot = in8(PIXIS_BASE + 0x16);
>
> --------------------------------^^^^^^^
>
> Maybe you can use a symbolic name here, too?
>
> > + if ((vboot >> 7) & 0x1)
>
> if (vboot & 0x80) ???
>
> > + printf ("vBank: %d\n", ((vboot >> 6) & 0x1));
>
> printf ("vBank: %d\n", !!(vboot & 0x40)); ???
>
> And eventually you can even come up with symbolic names for the magic
> numbers 0x80 and 0x40 ?
And please switch from using in8() to in_8().
Best regards,
Stefan
=====================================================================
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
=====================================================================
prev parent reply other threads:[~2009-07-21 15:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 14:41 [U-Boot] [PATCH] 86xx: Report which "bank" of NOR flash we are booting from on MPC8641HPCN Kumar Gala
2009-07-21 15:05 ` Wolfgang Denk
2009-07-21 15:11 ` Stefan Roese [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=200907211711.05122.sr@denx.de \
--to=sr@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