From: Mike Frysinger Date: Tue, 6 Jan 2009 11:16:19 +0000 (-0500) Subject: Blackfin: output booting source when booting X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=fc68f9f85959664d528daea2aef5ef54974331ce;p=project%2Fbcm63xx%2Fu-boot.git Blackfin: output booting source when booting Knowing the booting source of the part is useful, especially when the part can switch dynamically between sources. Signed-off-by: Mike Frysinger --- diff --git a/include/asm-blackfin/blackfin-config-pre.h b/include/asm-blackfin/blackfin-config-pre.h index 714352b1cd..a1fae5c9a7 100644 --- a/include/asm-blackfin/blackfin-config-pre.h +++ b/include/asm-blackfin/blackfin-config-pre.h @@ -38,4 +38,26 @@ #define BFIN_BOOT_8HOST_DMA 12 /* boot ldr from 8-bit host dma */ #define BFIN_BOOT_NAND 13 /* boot ldr from nand flash */ +#ifndef __ASSEMBLY__ +static inline const char *get_bfin_boot_mode(int bfin_boot) +{ + switch (bfin_boot) { + case BFIN_BOOT_BYPASS: return "bypass"; + case BFIN_BOOT_PARA: return "parallel flash"; + case BFIN_BOOT_SPI_MASTER: return "spi flash"; + case BFIN_BOOT_SPI_SLAVE: return "spi slave"; + case BFIN_BOOT_TWI_MASTER: return "i2c flash"; + case BFIN_BOOT_TWI_SLAVE: return "i2c slave"; + case BFIN_BOOT_UART: return "uart"; + case BFIN_BOOT_IDLE: return "idle"; + case BFIN_BOOT_FIFO: return "fifo"; + case BFIN_BOOT_MEM: return "memory"; + case BFIN_BOOT_16HOST_DMA: return "16bit dma"; + case BFIN_BOOT_8HOST_DMA: return "8bit dma"; + case BFIN_BOOT_NAND: return "nand flash"; + default: return "INVALID"; + } +} +#endif + #endif diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index 03553ab841..c22371197f 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -70,7 +70,11 @@ void *sbrk(ptrdiff_t increment) static int display_banner(void) { printf("\n\n%s\n\n", version_string); - printf("CPU: ADSP " MK_STR(CONFIG_BFIN_CPU) " (Detected Rev: 0.%d)\n", bfin_revid()); + printf("CPU: ADSP " MK_STR(CONFIG_BFIN_CPU) " " + "(Detected Rev: 0.%d) " + "(%s boot)\n", + bfin_revid(), + get_bfin_boot_mode(CONFIG_BFIN_BOOT_MODE)); return 0; }