public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] zynq/board.c: Add support for qspiboot and nandboot
@ 2017-01-13 13:04 Mike Looijmans
  2017-01-13 13:18 ` Michal Simek
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Looijmans @ 2017-01-13 13:04 UTC (permalink / raw)
  To: u-boot

The Zynq can also boot from QSPI or NAND, and environment scripting
uses "qspiboot" and "nandboot" already. Add these to the board init
routines so that modeboot is properly set to one of these values when
the mode bits indicate so.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
 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 5cd9bbf..cf80302 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -85,9 +85,15 @@ 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_NOR:
 		setenv("modeboot", "norboot");
 		break;
+	case ZYNQ_BM_NAND:
+		setenv("modeboot", "nandboot");
+		break;
 	case ZYNQ_BM_SD:
 		setenv("modeboot", "sdboot");
 		break;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-13 13:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-13 13:04 [U-Boot] [PATCH] zynq/board.c: Add support for qspiboot and nandboot Mike Looijmans
2017-01-13 13:18 ` Michal Simek
2017-01-13 13:51   ` Mike Looijmans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox