summaryrefslogtreecommitdiff
path: root/include/asm-blackfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-01-06 06:16:19 -0500
committerMike Frysinger <vapier@gentoo.org>2009-02-02 12:27:16 -0500
commitfc68f9f85959664d528daea2aef5ef54974331ce (patch)
tree9094be183801b09f5651f491311ec3b509772e57 /include/asm-blackfin
parent8df3ce0f49c37947800ac7c84e751499882619fc (diff)
downloadu-boot-imx-fc68f9f85959664d528daea2aef5ef54974331ce.zip
u-boot-imx-fc68f9f85959664d528daea2aef5ef54974331ce.tar.gz
u-boot-imx-fc68f9f85959664d528daea2aef5ef54974331ce.tar.bz2
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 <vapier@gentoo.org>
Diffstat (limited to 'include/asm-blackfin')
-rw-r--r--include/asm-blackfin/blackfin-config-pre.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asm-blackfin/blackfin-config-pre.h b/include/asm-blackfin/blackfin-config-pre.h
index 714352b..a1fae5c 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