summaryrefslogtreecommitdiff
path: root/board/freescale
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-07-15 13:45:00 -0500
committerKumar Gala <galak@kernel.crashing.org>2009-07-22 09:08:50 -0500
commit9af9c6bdc16da53772c56b1a79c2c91701fe94e6 (patch)
tree599b8209eb83e12b9d9d61481b66e7383ac9a94e /board/freescale
parent89188a62333c0841a7166783d2ebdd39d7044eb2 (diff)
downloadu-boot-imx-9af9c6bdc16da53772c56b1a79c2c91701fe94e6.zip
u-boot-imx-9af9c6bdc16da53772c56b1a79c2c91701fe94e6.tar.gz
u-boot-imx-9af9c6bdc16da53772c56b1a79c2c91701fe94e6.tar.bz2
86xx: Report which "bank" of NOR flash we are booting from on MPC8641HPCN
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>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/mpc8641hpcn/mpc8641hpcn.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
index 7422e6b..441127b 100644
--- a/board/freescale/mpc8641hpcn/mpc8641hpcn.c
+++ b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
@@ -42,10 +42,20 @@ 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",
- in8(PIXIS_BASE + PIXIS_ID), in8(PIXIS_BASE + PIXIS_VER),
- in8(PIXIS_BASE + PIXIS_PVER));
+ u8 vboot;
+ u8 *pixis_base = (u8 *)PIXIS_BASE;
+
+ printf ("Board: MPC8641HPCN, Sys ID: 0x%02x, "
+ "Sys Ver: 0x%02x, FPGA Ver: 0x%02x, ",
+ in_8(pixis_base + PIXIS_ID), in_8(pixis_base + PIXIS_VER),
+ in_8(pixis_base + PIXIS_PVER));
+
+ vboot = in_8(pixis_base + PIXIS_VBOOT);
+ if (vboot & PIXIS_VBOOT_FMAP)
+ printf ("vBank: %d\n", ((vboot & PIXIS_VBOOT_FBANK) >> 6));
+ else
+ puts ("Promjet\n");
+
#ifdef CONFIG_PHYS_64BIT
printf (" 36-bit physical address map\n");
#endif