Merge branch 'master' of git://www.denx.de/git/u-boot-imx
[oweals/u-boot.git] / arch / arm / mach-uniphier / reset.c
index b5825bc0c7f134a241db24d0724f6ce46a5cd0b3..43e27d12c3e15a3dd1c7103f5ab6e1db3f87f9c5 100644 (file)
@@ -1,15 +1,25 @@
 /*
- * Copyright (C) 2012-2015 Masahiro Yamada <yamada.masahiro@socionext.com>
+ * Copyright (C) 2012-2014 Panasonic Corporation
+ * Copyright (C) 2015-2016 Socionext Inc.
+ *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <linux/io.h>
+#include <asm/secure.h>
 
 #include "sc-regs.h"
 
-void reset_cpu(unsigned long ignored)
+/* If PSCI is enabled, this is used for SYSTEM_RESET function */
+#ifdef CONFIG_ARMV7_PSCI
+#define __SECURE       __secure
+#else
+#define __SECURE
+#endif
+
+void __SECURE reset_cpu(unsigned long ignored)
 {
        u32 tmp;