diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2011-07-12 16:16:14 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-07-15 16:49:30 -0700 |
commit | abe8c45b7e86f7d9ee2c508b6cae8acdbb624563 (patch) | |
tree | 566ebc06242e8df4cd4e988211377b1e8c1b3905 /arch/arm/mach-tegra/board-cardhu.c | |
parent | 621614719837f9ff5664d9de523930ca3b216a7a (diff) |
arm: tegra: suspend: Add board specific suspend/resume calls
Adding board specific suspend and resume call apis through platform
data.
Added call of these function at appropriate stage of suspend/resume.
Added mechanism to select the uart debug channel base address through
variable so that board file can directly change this.
bug 820536
bug 832273
Change-Id: Ia9ff3b8a8d2faa1071a8ff634960e6a6c8a43d40
Reviewed-on: http://git-master/r/34494
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu.c | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c index 490cc6981085..85222bfe8d9c 100644 --- a/arch/arm/mach-tegra/board-cardhu.c +++ b/arch/arm/mach-tegra/board-cardhu.c @@ -50,6 +50,7 @@ #include <asm/mach/arch.h> #include <mach/usb_phy.h> #include <sound/wm8903.h> +#include <mach/suspend.h> #include "board.h" #include "clock.h" @@ -446,8 +447,35 @@ static struct tegra_uart_platform_data cardhu_uart_pdata; static void __init uart_debug_init(void) { struct board_info board_info; - int i; + + tegra_get_board_info(&board_info); + if (board_info.sku & SKU_SLT_ULPI_SUPPORT) { + if ((board_info.board_id == BOARD_E1186) || + (board_info.board_id == BOARD_E1187) || + (board_info.board_id == BOARD_PM269)) { + /* UARTB is the debug port. */ + pr_info("Selecting UARTB as the debug console\n"); + cardhu_uart_devices[1] = &debug_uartb_device; + debug_uart_clk = clk_get_sys("serial8250.0", "uartb"); + debug_uart_port_base = ((struct plat_serial8250_port *)( + debug_uartb_device.dev.platform_data))->mapbase; + return; + } + pr_err("%s(): Unhandled SKU information for Board 0x%04x\n", + __func__, board_info.board_id); + } + /* UARTA is the debug port. */ + pr_info("Selecting UARTA as the debug console\n"); + cardhu_uart_devices[0] = &debug_uarta_device; + debug_uart_clk = clk_get_sys("serial8250.0", "uarta"); + debug_uart_port_base = ((struct plat_serial8250_port *)( + debug_uarta_device.dev.platform_data))->mapbase; +} + +static void __init cardhu_uart_init(void) +{ struct clk *c; + int i; for (i = 0; i < ARRAY_SIZE(uart_parent_clk); ++i) { c = tegra_get_clock_by_name(uart_parent_clk[i].name); @@ -467,31 +495,6 @@ static void __init uart_debug_init(void) tegra_uartd_device.dev.platform_data = &cardhu_uart_pdata; tegra_uarte_device.dev.platform_data = &cardhu_uart_pdata; - tegra_get_board_info(&board_info); - if (board_info.sku & SKU_SLT_ULPI_SUPPORT) { - if ((board_info.board_id == BOARD_E1186) || - (board_info.board_id == BOARD_E1187) || - (board_info.board_id == BOARD_E1256) || - (board_info.board_id == BOARD_PM269)) { - /* UARTB is the debug port. */ - pr_info("Selecting UARTB as the debug console\n"); - cardhu_uart_devices[1] = &debug_uartb_device; - debug_uart_clk = - clk_get_sys("serial8250.0", "uartb"); - return; - } - pr_err("%s(): Unhandled SKU information for Board 0x%04x\n", - __func__, board_info.board_id); - } - /* UARTA is the debug port. */ - pr_info("Selecting UARTA as the debug console\n"); - cardhu_uart_devices[0] = &debug_uarta_device; - debug_uart_clk = clk_get_sys("serial8250.0", "uarta"); -} - -static void __init cardhu_uart_init(void) -{ - struct clk *c; /* Register low speed only if it is selected */ if (!is_tegra_debug_uartport_hs()) { uart_debug_init(); |