ARM: tegra: use common console flush on reboot
Tom Cherry [Tue, 13 Mar 2012 22:23:20 +0000 (15:23 -0700)]
Bug 952455

Change-Id: I5272bdf2fc726994f3a22fd42671bb807bc30a21
Signed-off-by: Tom Cherry <tcherry@nvidia.com>
Reviewed-on: http://git-master/r/89875
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

arch/arm/configs/tegra3_android_defconfig
arch/arm/configs/tegra3_defconfig
arch/arm/mach-tegra/common.c

index 498caf8..4c533e6 100644 (file)
@@ -49,6 +49,7 @@ CONFIG_PREEMPT=y
 CONFIG_AEABI=y
 # CONFIG_OABI_COMPAT is not set
 CONFIG_HIGHMEM=y
+CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CPU_FREQ=y
index bbb0f01..c649f5e 100644 (file)
@@ -50,6 +50,7 @@ CONFIG_PREEMPT=y
 CONFIG_AEABI=y
 # CONFIG_OABI_COMPAT is not set
 CONFIG_HIGHMEM=y
+CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART=y
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_CPU_FREQ=y
index 7d4703f..6b345f4 100644 (file)
@@ -419,39 +419,8 @@ static void __init tegra_init_ahb_gizmo_settings(void)
        gizmo_writel(val, AHB_MEM_PREFETCH_CFG4);
 }
 
-static bool console_flushed;
-
-static void tegra_pm_flush_console(void)
-{
-       if (console_flushed)
-               return;
-       console_flushed = true;
-
-       pr_emerg("Restarting %s\n", linux_banner);
-       if (console_trylock()) {
-               console_unlock();
-               return;
-       }
-
-       mdelay(50);
-
-       local_irq_disable();
-       if (!console_trylock())
-               pr_emerg("%s: Console was locked! Busting\n", __func__);
-       else
-               pr_emerg("%s: Console was locked!\n", __func__);
-       console_unlock();
-}
-
-static void tegra_pm_restart(char mode, const char *cmd)
-{
-       tegra_pm_flush_console();
-       arm_machine_restart(mode, cmd);
-}
-
 void __init tegra_init_early(void)
 {
-       arm_pm_restart = tegra_pm_restart;
 #ifndef CONFIG_SMP
        /* For SMP system, initializing the reset handler here is too
           late. For non-SMP systems, the function that calls the reset