summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-cardhu.c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-07-12 16:16:14 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:43 -0800
commita822cff7d11d896ac63f16aa797a180ba35f1c2c (patch)
tree6f6e578359e7c9717059971edec3c3fed1232b20 /arch/arm/mach-tegra/board-cardhu.c
parent89e04f1debe994d0161e9a519b53f74f9fd4d347 (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 Original-Change-Id: Ia9ff3b8a8d2faa1071a8ff634960e6a6c8a43d40 Reviewed-on: http://git-master/r/34494 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R6d7bfb3f8f9152779f5138cbcd1b7a9e9a9545df
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu.c')
-rw-r--r--arch/arm/mach-tegra/board-cardhu.c55
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 897c91f95770..1d28df5bea5e 100644
--- a/arch/arm/mach-tegra/board-cardhu.c
+++ b/arch/arm/mach-tegra/board-cardhu.c
@@ -57,6 +57,7 @@
#include "devices.h"
#include "gpio-names.h"
#include "fuse.h"
+#include "pm.h"
/* !!!TODO: Change for cardhu (Taken from Ventana) */
@@ -281,8 +282,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);
@@ -302,31 +330,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();