linux-3.0.x for AP-SH4A-0A Board
リビジョン | 99ac3a5e408ddb63a658b4668da8f8761ca1bfc0 (tree) |
---|---|
日時 | 2011-08-22 22:50:00 |
作者 | Kyungmin Park <kyungmin.park@sams...> |
コミッター | Nicolas Pitre |
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)
@@ -24,8 +24,10 @@ | ||
24 | 24 | #include <plat/devs.h> |
25 | 25 | #include <plat/fimc-core.h> |
26 | 26 | #include <plat/iic-core.h> |
27 | +#include <plat/reset.h> | |
27 | 28 | |
28 | 29 | #include <mach/regs-irq.h> |
30 | +#include <mach/regs-pmu.h> | |
29 | 31 | |
30 | 32 | extern int combiner_init(unsigned int combiner_nr, void __iomem *base, |
31 | 33 | unsigned int irq_start); |
@@ -114,6 +116,11 @@ static void exynos4_idle(void) | ||
114 | 116 | local_irq_enable(); |
115 | 117 | } |
116 | 118 | |
119 | +static void exynos4_sw_reset(void) | |
120 | +{ | |
121 | + __raw_writel(0x1, S5P_SWRESET); | |
122 | +} | |
123 | + | |
117 | 124 | /* |
118 | 125 | * exynos4_map_io |
119 | 126 | * |
@@ -222,5 +229,8 @@ int __init exynos4_init(void) | ||
222 | 229 | /* set idle function */ |
223 | 230 | pm_idle = exynos4_idle; |
224 | 231 | |
232 | + /* set sw_reset function */ | |
233 | + s5p_reset_hook = exynos4_sw_reset; | |
234 | + | |
225 | 235 | return sysdev_register(&exynos4_sysdev); |
226 | 236 | } |
@@ -29,6 +29,8 @@ | ||
29 | 29 | #define S5P_USE_STANDBY_WFE1 (1 << 25) |
30 | 30 | #define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24)) |
31 | 31 | |
32 | +#define S5P_SWRESET S5P_PMUREG(0x0400) | |
33 | + | |
32 | 34 | #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) |
33 | 35 | #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) |
34 | 36 | #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) |