Permalink
Browse files

Make config option to choose hardboot restart mode (normal or recovery)

  • Loading branch information...
Tasssadar committed Jan 17, 2013
1 parent ef06f6d commit 00704a09274111313de773dbb1997b84164e2203
Showing with 13 additions and 2 deletions.
  1. +1 −0 arch/arm/configs/cyanogenmod_grouper_defconfig
  2. +9 −0 arch/arm/mach-tegra/Kconfig
  3. +3 −2 arch/arm/mach-tegra/reset.c
@@ -341,6 +341,7 @@ CONFIG_TEGRA_PLLM_RESTRICTED=y
CONFIG_TEGRA_LP2_ARM_TWD=y
CONFIG_TEGRA_SLOW_CSITE=y
# CONFIG_TEGRA_PREINIT_CLOCKS is not set
+# CONFIG_GROUPER_HARDBOOT_RECOVERY is not set
#
# Processor Type
@@ -504,4 +504,13 @@ config TEGRA_PREINIT_CLOCKS
help
Preinitialize Tegra clocks to known states before actual full-
scale clock initialization starts.
+
+config GROUPER_HARDBOOT_RECOVERY
+ bool "Reboot to recovery partition when using Kexec-hardboot"
+ depends on MACH_GROUPER
+ depends on KEXEC_HARDBOOT
+ default n
+ help
+ Reboot with the recovery kernel since the boot kernel decompressor may
+ not support the hardboot jump.
endif
@@ -92,7 +92,8 @@ void tegra_cpu_reset_handler_restore(void)
}
#endif
-#ifdef CONFIG_KEXEC_HARDBOOT
+
+#if defined(CONFIG_KEXEC_HARDBOOT) && defined(CONFIG_GROUPER_HARDBOOT_RECOVERY)
#define RECOVERY_MODE BIT(31)
void tegra_kexec_hardboot(void)
{
@@ -132,7 +133,7 @@ void __init tegra_cpu_reset_handler_init(void)
tegra_cpu_reset_handler_enable();
-#ifdef CONFIG_KEXEC_HARDBOOT
+#if defined(CONFIG_KEXEC_HARDBOOT) && defined(CONFIG_GROUPER_HARDBOOT_RECOVERY)
kexec_hardboot_hook = tegra_kexec_hardboot;
#endif
}

0 comments on commit 00704a0

Please sign in to comment.