summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/board-cardhu.c4
-rw-r--r--arch/arm/mach-tegra/board-enterprise.c4
-rw-r--r--arch/arm/mach-tegra/devices.c18
-rw-r--r--arch/arm/mach-tegra/devices.h5
4 files changed, 28 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c
index bea6a6f19882..8bf2501c29c6 100644
--- a/arch/arm/mach-tegra/board-cardhu.c
+++ b/arch/arm/mach-tegra/board-cardhu.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/board-cardhu.c
*
- * Copyright (c) 2011, NVIDIA Corporation.
+ * Copyright (c) 2011-2012, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -346,6 +346,8 @@ static void __init uart_debug_init(void)
(board_info.board_id == BOARD_E1257))
debug_port_id = 1;
}
+
+ tegra_init_debug_uart_rate();
switch (debug_port_id) {
case 0:
/* UARTA is the debug port. */
diff --git a/arch/arm/mach-tegra/board-enterprise.c b/arch/arm/mach-tegra/board-enterprise.c
index f631c9b93cb2..9e4ab51926c2 100644
--- a/arch/arm/mach-tegra/board-enterprise.c
+++ b/arch/arm/mach-tegra/board-enterprise.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/board-enterprise.c
*
- * Copyright (c) 2011, NVIDIA Corporation.
+ * Copyright (c) 2011-2012, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -395,6 +395,8 @@ static void __init uart_debug_init(void)
unsigned long rate;
struct clk *c;
+ tegra_init_debug_uart_rate();
+
/* UARTD is the debug port. */
pr_info("Selecting UARTD as the debug console\n");
enterprise_uart_devices[3] = &debug_uartd_device;
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index 549db73f1627..39bc04bd2e39 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -27,6 +27,7 @@
#include <linux/platform_data/tegra_usb.h>
#include <linux/tegra_avp.h>
#include <linux/nvhost.h>
+#include <linux/clk.h>
#include <asm/pmu.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
@@ -1733,3 +1734,20 @@ struct platform_device tegra_nvmap_device = {
.name = "tegra-nvmap",
.id = -1,
};
+
+void tegra_init_debug_uart_rate(void)
+{
+ unsigned int uartclk;
+ struct clk *debug_uart_parent = clk_get_sys(NULL, "pll_p");
+
+ BUG_ON(IS_ERR(debug_uart_parent));
+ uartclk = clk_get_rate(debug_uart_parent);
+
+ debug_uarta_platform_data[0].uartclk = uartclk;
+ debug_uartb_platform_data[0].uartclk = uartclk;
+ debug_uartc_platform_data[0].uartclk = uartclk;
+ debug_uartd_platform_data[0].uartclk = uartclk;
+#if !defined(CONFIG_ARCH_TEGRA_2x_SOC)
+ debug_uarte_platform_data[0].uartclk = uartclk;
+#endif
+}
diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h
index 6d7c7cab3cdf..ff93216ce292 100644
--- a/arch/arm/mach-tegra/devices.h
+++ b/arch/arm/mach-tegra/devices.h
@@ -5,7 +5,7 @@
* Colin Cross <ccross@android.com>
* Erik Gilling <ccross@android.com>
*
- * Copyright (C) 2010-2011 NVIDIA Corporation.
+ * Copyright (C) 2010-2012 NVIDIA Corporation.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -126,4 +126,7 @@ extern struct platform_device debug_uarte_device;
extern struct nvhost_device tegra_disp1_device;
extern struct platform_device tegra_nvmap_device;
+
+void tegra_init_debug_uart_rate(void);
+
#endif