From: Wolfgang Denk Date: Tue, 21 Jul 2009 19:42:37 +0200 Subject: [U-Boot] [PATCH v2] 86xx: Report which "bank" of NOR flash we are booting from on MPC8641HPCN In-Reply-To: <1248193876-15362-1-git-send-email-galak@kernel.crashing.org> References: <1248193876-15362-1-git-send-email-galak@kernel.crashing.org> Message-ID: <20090721174237.A5017832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Kumar Gala, In message <1248193876-15362-1-git-send-email-galak@kernel.crashing.org> you wrote: > The MPC8641HPCN board is capable of swizzling the upper address bit of > the NOR flash we boot out of which creates the concept of "virtual" > banks. This is useful in that we can flash a test of image of u-boot > and reset to one of the virtual banks while still maintaining a > working image in "bank 0". > > The PIXIS FPGA exposes registers on LBC which we can use to determine > which "bank" we are booting out of (as well as setting which bank to > boot out of). > > Signed-off-by: Kumar Gala > --- > * Moved from in8 -> in_8 > * used PIXIS_VBOOT instead of magic 0x16 ... > + if (vboot & 0x80) > + printf ("vBank: %d\n", ((vboot >> 6) & 0x1)); Any reasons for not using some named constants instead of the magix values 0x80 and 0x40 ? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "No matter where you go, there you are..." - Buckaroo Banzai