summaryrefslogtreecommitdiffstats
path: root/bsps/arm/xilinx-zynq/start/bspreset.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/arm/xilinx-zynq/start/bspreset.c')
-rw-r--r--bsps/arm/xilinx-zynq/start/bspreset.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/bsps/arm/xilinx-zynq/start/bspreset.c b/bsps/arm/xilinx-zynq/start/bspreset.c
new file mode 100644
index 0000000000..b57354c9e2
--- /dev/null
+++ b/bsps/arm/xilinx-zynq/start/bspreset.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2013, 2017 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <info@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <bsp.h>
+#include <bsp/bootcard.h>
+#include <bsp/zynq-uart.h>
+
+void bsp_reset(void)
+{
+ volatile uint32_t *slcr_unlock = (volatile uint32_t *) 0xf8000008;
+ volatile uint32_t *pss_rst_ctrl = (volatile uint32_t *) 0xf8000200;
+
+ zynq_uart_reset_tx_flush(&zynq_uart_instances[BSP_CONSOLE_MINOR]);
+
+ while (true) {
+ *slcr_unlock = 0xdf0d;
+ *pss_rst_ctrl = 0x1;
+ }
+}