aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorchunggeol.kim <chunggeol.kim@samsung.com>2010-09-02 13:31:20 -0700
committerArve Hjønnevåg <arve@android.com>2011-11-17 17:43:57 -0800
commit65f20d48e0ed155989f6789b6c96b0f96d11a329 (patch)
tree45434e33b7bf573256edd8e6cfc0459a54992f68 /arch/arm
parent60403d618a5c63ee9d76cf6d563988bfc755fc8b (diff)
downloadkernel_samsung_crespo-65f20d48e0ed155989f6789b6c96b0f96d11a329.zip
kernel_samsung_crespo-65f20d48e0ed155989f6789b6c96b0f96d11a329.tar.gz
kernel_samsung_crespo-65f20d48e0ed155989f6789b6c96b0f96d11a329.tar.bz2
S5PC11X: RECOVERY: Add reboot notifier for gota
Change-Id: I6475480ecee534814d639d8651b6a48631efb4df Signed-off-by: chunggeol.kim <chunggeol.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-s5pv210/mach-herring.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/arch/arm/mach-s5pv210/mach-herring.c b/arch/arm/mach-s5pv210/mach-herring.c
index c77e092..c3c5109 100644
--- a/arch/arm/mach-s5pv210/mach-herring.c
+++ b/arch/arm/mach-s5pv210/mach-herring.c
@@ -77,8 +77,8 @@ EXPORT_SYMBOL(sec_set_param_value);
void (*sec_get_param_value)(int idx, void *value);
EXPORT_SYMBOL(sec_get_param_value);
-#define MAGIC_CDDE_RECOVERY 0x00000004
-#define MAGIC_CDDE_NORMAL 0x00000000
+#define KERNEL_REBOOT_MASK 0xFFFFFFFF
+#define REBOOT_MODE_FAST_BOOT 7
static int herring_notifier_call(struct notifier_block *this,
unsigned long code, void *_cmd)
@@ -89,16 +89,15 @@ static int herring_notifier_call(struct notifier_block *this,
if ((code == SYS_RESTART) && _cmd) {
if (!strcmp((char *)_cmd, "recovery"))
mode = REBOOT_MODE_RECOVERY;
+ else if (!strcmp((char *)_cmd, "bootloader"))
+ mode = REBOOT_MODE_FAST_BOOT;
+ else
+ mode = REBOOT_MODE_NONE;
}
- if (mode == REBOOT_MODE_RECOVERY) {
- temp = __raw_readl(S5P_INFORM6);
- temp |= MAGIC_CDDE_RECOVERY;
- __raw_writel(temp, S5P_INFORM6);
- } else {
- temp = __raw_readl(S5P_INFORM6);
- temp |= MAGIC_CDDE_NORMAL;
- __raw_writel(temp, S5P_INFORM6);
- }
+ temp = __raw_readl(S5P_INFORM6);
+ temp |= KERNEL_REBOOT_MASK;
+ temp &= mode;
+ __raw_writel(temp, S5P_INFORM6);
return NOTIFY_DONE;
}