From 65f20d48e0ed155989f6789b6c96b0f96d11a329 Mon Sep 17 00:00:00 2001 From: "chunggeol.kim" Date: Thu, 2 Sep 2010 13:31:20 -0700 Subject: S5PC11X: RECOVERY: Add reboot notifier for gota Change-Id: I6475480ecee534814d639d8651b6a48631efb4df Signed-off-by: chunggeol.kim --- arch/arm/mach-s5pv210/mach-herring.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'arch/arm') 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; } -- cgit v1.1