summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-07-21 16:10:13 +0200
committerMarek Vasut <marex@denx.de>2015-08-08 14:14:08 +0200
commitd85e311e7f1aa11ae168754c253b25e5d64ed123 (patch)
treeb991c8ef35b22f1bf93cf55a830cb139488023fe /arch/arm
parentef84861b7d3a78c0ba5754e592f5b08026ffbdd1 (diff)
downloadu-boot-imx-d85e311e7f1aa11ae168754c253b25e5d64ed123.zip
u-boot-imx-d85e311e7f1aa11ae168754c253b25e5d64ed123.tar.gz
u-boot-imx-d85e311e7f1aa11ae168754c253b25e5d64ed123.tar.bz2
arm: socfpga: misc: Add support for printing boot mode
Add support for printing from which device the SoCFPGA board booted. This decodes the BSEL settings and prints it in human readable form. Signed-off-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-socfpga/misc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index a6ff793..d653bf6 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -101,12 +101,25 @@ int cpu_mmc_init(bd_t *bis)
#endif
#if defined(CONFIG_DISPLAY_CPUINFO)
+const char * const bsel_str[] = {
+ "Reserved",
+ "FPGA (HPS2FPGA Bridge)",
+ "NAND Flash (1.8V)",
+ "NAND Flash (3.0V)",
+ "SD/MMC External Transceiver (1.8V)",
+ "SD/MMC Internal Transceiver (3.0V)",
+ "QSPI Flash (1.8V)",
+ "QSPI Flash (3.0V)",
+};
+
/*
* Print CPU information
*/
int print_cpuinfo(void)
{
+ const u32 bsel = readl(&sysmgr_regs->bootinfo) & 0x7;
puts("CPU: Altera SoCFPGA Platform\n");
+ printf("BOOT: %s\n", bsel_str[bsel]);
return 0;
}
#endif