public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] 86xx: Report which "bank" of NOR flash we are booting from on MPC8641HPCN
@ 2009-07-21 14:41 Kumar Gala
  2009-07-21 15:05 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2009-07-21 14:41 UTC (permalink / raw)
  To: u-boot

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 <galak@kernel.crashing.org>
---
 board/freescale/mpc8641hpcn/mpc8641hpcn.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index 7422e6b..d115ce1 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -42,10 +42,19 @@ int board_early_init_f(void)
 
 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);
+	if ((vboot >> 7) & 0x1)
+		printf ("vBank: %d\n", ((vboot >> 6) & 0x1));
+	else
+		puts ("Promjet\n");
+
 #ifdef CONFIG_PHYS_64BIT
 	printf ("       36-bit physical address map\n");
 #endif
-- 
1.6.0.6

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

end of thread, other threads:[~2009-07-21 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox