arm: tegra: Console suspend for all boards
Laxman Dewangan [Mon, 18 Jul 2011 06:17:13 +0000 (11:17 +0530)]
Added the board level suspend/resume and call the console
suspend from board level suspend/resume.

bug 820536

Original-Change-Id: I246265241246dc0682870571c927bd23023e5aca
Reviewed-on: http://git-master/r/41448
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Narendra Damahe <ndamahe@nvidia.com>

Rebase-Id: R712acfe9a1ede8ef8d237ad993bcb5a9eac22a4d

arch/arm/mach-tegra/board-cardhu-power.c
arch/arm/mach-tegra/board-cardhu.c
arch/arm/mach-tegra/board-cardhu.h

index 051ace4..b16447a 100644 (file)
@@ -902,13 +902,13 @@ int __init cardhu_gpio_switch_regulator_init(void)
 static void cardhu_board_suspend(int lp_state, enum suspend_stage stg)
 {
        if ((lp_state == TEGRA_SUSPEND_LP1) && (stg == TEGRA_SUSPEND_BEFORE_CPU))
-               cardhu_debug_uart_suspend();
+               tegra_console_uart_suspend();
 }
 
 static void cardhu_board_resume(int lp_state, enum resume_stage stg)
 {
        if ((lp_state == TEGRA_SUSPEND_LP1) && (stg == TEGRA_RESUME_AFTER_CPU))
-               cardhu_debug_uart_resume();
+               tegra_console_uart_resume();
 }
 
 static struct tegra_suspend_platform_data cardhu_suspend_data = {
index b285a38..924a94a 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/spi/spi.h>
 #include <linux/i2c/atmel_mxt_ts.h>
 #include <linux/tegra_uart.h>
-#include <linux/console.h>
 
 #include <sound/wm8903.h>
 
@@ -277,7 +276,6 @@ static struct uart_clk_parent uart_parent_clk[] = {
        [2] = {.name = "clk_m"},
 };
 
-static struct clk *debug_uart_clk;
 static struct tegra_uart_platform_data cardhu_uart_pdata;
 
 static void __init uart_debug_init(void)
@@ -356,18 +354,6 @@ static void __init cardhu_uart_init(void)
                                ARRAY_SIZE(cardhu_uart_devices));
 }
 
-void cardhu_debug_uart_suspend(void)
-{
-       if (console_suspend_enabled)
-               clk_disable(debug_uart_clk);
-}
-
-void cardhu_debug_uart_resume(void)
-{
-       if (console_suspend_enabled)
-               clk_enable(debug_uart_clk);
-}
-
 static struct platform_device tegra_camera = {
        .name = "tegra_camera",
        .id = -1,
index eddc20c..f9ed1e5 100644 (file)
@@ -171,7 +171,4 @@ int cardhu_power_off_init(void);
 int cardhu_edp_init(void);
 int cardhu_pmon_init(void);
 
-void cardhu_debug_uart_suspend(void);
-void cardhu_debug_uart_resume(void);
-
 #endif