Skip to content
Snippets Groups Projects
Commit d85e311e authored by Marek Vasut's avatar Marek Vasut
Browse files

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: default avatarMarek Vasut <marex@denx.de>
parent ef84861b
No related branches found
No related tags found
No related merge requests found
...@@ -101,12 +101,25 @@ int cpu_mmc_init(bd_t *bis) ...@@ -101,12 +101,25 @@ int cpu_mmc_init(bd_t *bis)
#endif #endif
#if defined(CONFIG_DISPLAY_CPUINFO) #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 * Print CPU information
*/ */
int print_cpuinfo(void) int print_cpuinfo(void)
{ {
const u32 bsel = readl(&sysmgr_regs->bootinfo) & 0x7;
puts("CPU: Altera SoCFPGA Platform\n"); puts("CPU: Altera SoCFPGA Platform\n");
printf("BOOT: %s\n", bsel_str[bsel]);
return 0; return 0;
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment