summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2011-08-19 20:25:05 +0900
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-08-22 09:50:00 -0400
commit99ac3a5e408ddb63a658b4668da8f8761ca1bfc0 (patch)
treee441413b2b291baaf7fb2cc987f21c079436a4c2
parentdbf7603a92cd895b8c1017734bc30fd9a32fd933 (diff)
ARM: EXYNOS4: Add restart hook for proper reboot
This is required to use SWRESET. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> (cherry picked from commit d2edddf2b25863ec0893635662b0832f9965b543)
-rw-r--r--arch/arm/mach-exynos4/cpu.c10
-rw-r--r--arch/arm/mach-exynos4/include/mach/regs-pmu.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
index bfd621460ab..1139608fa11 100644
--- a/arch/arm/mach-exynos4/cpu.c
+++ b/arch/arm/mach-exynos4/cpu.c
@@ -24,8 +24,10 @@
#include <plat/devs.h>
#include <plat/fimc-core.h>
#include <plat/iic-core.h>
+#include <plat/reset.h>
#include <mach/regs-irq.h>
+#include <mach/regs-pmu.h>
extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
unsigned int irq_start);
@@ -114,6 +116,11 @@ static void exynos4_idle(void)
local_irq_enable();
}
+static void exynos4_sw_reset(void)
+{
+ __raw_writel(0x1, S5P_SWRESET);
+}
+
/*
* exynos4_map_io
*
@@ -222,5 +229,8 @@ int __init exynos4_init(void)
/* set idle function */
pm_idle = exynos4_idle;
+ /* set sw_reset function */
+ s5p_reset_hook = exynos4_sw_reset;
+
return sysdev_register(&exynos4_sysdev);
}
diff --git a/arch/arm/mach-exynos4/include/mach/regs-pmu.h b/arch/arm/mach-exynos4/include/mach/regs-pmu.h
index a9643371f8e..fbb79ccf00b 100644
--- a/arch/arm/mach-exynos4/include/mach/regs-pmu.h
+++ b/arch/arm/mach-exynos4/include/mach/regs-pmu.h
@@ -29,6 +29,8 @@
#define S5P_USE_STANDBY_WFE1 (1 << 25)
#define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24))
+#define S5P_SWRESET S5P_PMUREG(0x0400)
+
#define S5P_WAKEUP_STAT S5P_PMUREG(0x0600)
#define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604)
#define S5P_WAKEUP_MASK S5P_PMUREG(0x0608)