summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-layerscape/restart.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-layerscape/restart.c')
-rw-r--r--arch/arm/mach-layerscape/restart.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-layerscape/restart.c b/arch/arm/mach-layerscape/restart.c
new file mode 100644
index 0000000000..138a82bdb5
--- /dev/null
+++ b/arch/arm/mach-layerscape/restart.c
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <common.h>
+#include <init.h>
+#include <restart.h>
+#include <asm/io.h>
+#include <soc/fsl/immap_lsch2.h>
+#include <soc/fsl/fsl_immap.h>
+#include <mach/layerscape/layerscape.h>
+
+static void ls102xa_restart(struct restart_handler *rst)
+{
+ void __iomem *rcr = IOMEM(LSCH2_RST_ADDR);
+
+ /* Set RESET_REQ bit */
+ setbits_be32(rcr, 0x2);
+
+ mdelay(100);
+
+ hang();
+}
+
+void ls1021a_restart_register_feature(void)
+{
+ restart_handler_register_fn("soc-reset", ls102xa_restart);
+}