]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/sa1100/cpu.c
armv8: layerscape: Make U-Boot EL2 safe
[u-boot] / arch / arm / cpu / sa1100 / cpu.c
index 58e90dc9f69ec967e91675fd926d6f1ace7a1f10..59585af83a696b4a95e198ae42c8714aa2928733 100644 (file)
@@ -7,23 +7,7 @@
  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  * Alex Zuepke <azu@sysgo.de>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
 #include <common.h>
 #include <command.h>
 #include <asm/system.h>
-
-#ifdef CONFIG_USE_IRQ
-DECLARE_GLOBAL_DATA_PTR;
-#endif
+#include <asm/io.h>
 
 static void cache_flush(void);
 
@@ -68,3 +49,16 @@ static void cache_flush (void)
 
        asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
 }
+
+#define RST_BASE 0x90030000
+#define RSRR   0x00
+#define RCSR   0x04
+
+__attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
+{
+       /* repeat endlessly */
+       while (1) {
+               writel(0, RST_BASE + RCSR);
+               writel(1, RST_BASE + RSRR);
+       }
+}