summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorPradeep Goudagunta <pgoudagunta@nvidia.com>2011-03-23 23:16:12 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-03-24 17:53:12 -0700
commit954c40c24a53122b8db8bf0dff3af764a9374076 (patch)
tree4ee276d8a308ae06a21138f5fe137635f72fa480 /arch
parentdf3bc87db3c16ffe79b67146a6940e42fa719912 (diff)
arm: tegra: use debug_uartport kernel parameter
Use debug_uartport kernel option to configure debug uart port as high speed(ttyHS1) or low speed(ttyS0) according to odmdata(19:18). Bug 803465 Change-Id: Ide9a74c358a42f25ddb3ca03f4d949dc053f59f4 Reviewed-on: http://git-master/r/24019 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-whistler.c5
-rw-r--r--arch/arm/mach-tegra/board.h1
-rw-r--r--arch/arm/mach-tegra/common.c18
3 files changed, 23 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board-whistler.c b/arch/arm/mach-tegra/board-whistler.c
index 748d6e50788e..de0ef59445fe 100644
--- a/arch/arm/mach-tegra/board-whistler.c
+++ b/arch/arm/mach-tegra/board-whistler.c
@@ -385,7 +385,6 @@ static struct platform_device tegra_camera = {
static struct platform_device *whistler_devices[] __initdata = {
&androidusb_device,
- &debug_uart,
&tegra_uartb_device,
&tegra_uartc_device,
&pmu_device,
@@ -557,6 +556,10 @@ static void __init tegra_whistler_init(void)
tegra_i2s_device1.dev.platform_data = &tegra_audio_pdata[0];
tegra_i2s_device2.dev.platform_data = &tegra_audio_pdata[1];
tegra_spdif_device.dev.platform_data = &tegra_spdif_pdata;
+ if (is_tegra_debug_uartport_hs() == true)
+ platform_device_register(&tegra_uarta_device);
+ else
+ platform_device_register(&debug_uart);
platform_add_devices(whistler_devices, ARRAY_SIZE(whistler_devices));
tegra_das_device.dev.platform_data = &tegra_das_pdata;
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index 8a25cf664e8d..a42ea6582f30 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -33,6 +33,7 @@ void __init tegra_protected_aperture_init(unsigned long aperture);
void tegra_move_framebuffer(unsigned long to, unsigned long from,
unsigned long size);
int tegra_dvfs_rail_disable_by_name(const char *reg_id);
+bool is_tegra_debug_uartport_hs(void);
extern unsigned long tegra_bootloader_fb_start;
extern unsigned long tegra_bootloader_fb_size;
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 2024612a718e..725765ec7a09 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -51,6 +51,7 @@ unsigned long tegra_carveout_size;
unsigned long tegra_lp0_vec_start;
unsigned long tegra_lp0_vec_size;
unsigned long tegra_grhost_aperture;
+static bool is_tegra_debug_uart_hsport;
static struct board_info tegra_board_info = {
.board_id = -1,
@@ -229,6 +230,23 @@ static int __init tegra_board_info_parse(char *info)
__setup("board_info=", tegra_board_info_parse);
+static int __init tegra_debug_uartport(char *info)
+{
+ if (!strcmp(info, "hsport"))
+ is_tegra_debug_uart_hsport = true;
+ else if (!strcmp(info, "lsport"))
+ is_tegra_debug_uart_hsport = false;
+
+ return 1;
+}
+
+bool is_tegra_debug_uartport_hs(void)
+{
+ return is_tegra_debug_uart_hsport;
+}
+
+__setup("debug_uartport=", tegra_debug_uartport);
+
void tegra_get_board_info(struct board_info *bi)
{
memcpy(bi, &tegra_board_info, sizeof(*bi));