[U-Boot] [PATCH 3/4] ARM: zynq: Setup modeboot variable based on boot mode

Michal Simek michal.simek at xilinx.com
Fri Dec 16 13:38:43 CET 2016


modeboot variable is used for saving inforation which bootmode
is used.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 board/xilinx/zynq/board.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 5cd9bbf711f7..6a3cbe0a0dc4 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -85,6 +85,12 @@ int board_init(void)
 int board_late_init(void)
 {
 	switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
+	case ZYNQ_BM_QSPI:
+		setenv("modeboot", "qspiboot");
+		break;
+	case ZYNQ_BM_NAND:
+		setenv("modeboot", "nandboot");
+		break;
 	case ZYNQ_BM_NOR:
 		setenv("modeboot", "norboot");
 		break;
-- 
1.9.1



More information about the U-Boot mailing list