The p2020DS board is capable of swizzling the upper adress bits 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 ngPIXIS 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 <ga...@kernel.crashing.org>
---
 board/freescale/p2020ds/p2020ds.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/board/freescale/p2020ds/p2020ds.c 
b/board/freescale/p2020ds/p2020ds.c
index 293e5a4..1ddb0b8 100644
--- a/board/freescale/p2020ds/p2020ds.c
+++ b/board/freescale/p2020ds/p2020ds.c
@@ -47,14 +47,24 @@ phys_size_t fixed_sdram(void);
 
 int checkboard(void)
 {
+       u8 sw7;
+
        puts("Board: P2020DS ");
 #ifdef CONFIG_PHYS_64BIT
        puts("(36-bit addrmap) ");
 #endif
+
        printf("Sys ID: 0x%02x, "
-               "Sys Ver: 0x%02x, FPGA Ver: 0x%02x\n",
+               "Sys Ver: 0x%02x, FPGA Ver: 0x%02x, ",
                in8(PIXIS_BASE + PIXIS_ID), in8(PIXIS_BASE + PIXIS_VER),
                in8(PIXIS_BASE + PIXIS_PVER));
+
+       sw7 = in8(PIXIS_BASE + 0x2c);
+       if ((sw7 >> 7) & 0x1)
+               printf ("Promjet\n");
+       else
+               printf ("vBank: %d\n", ((sw7 >> 4) & 0x3));
+
        return 0;
 }
 
-- 
1.6.0.6

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to