summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-09-08 19:36:17 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-10-10 16:53:59 -0700
commit896c91729dd756af6ecd79d894edf53915982cfe (patch)
treefce77e57f50b9107346b08bd8671f7e4decff05d /arch
parent05db9cc0174bc1cd68bc00bc3aee742117d34370 (diff)
arm: tegra: parse kernel command line for debug port id
Parsing the linux command line for the debug port id. bug 795847 Reviewed-on: http://git-master/r/51370 (cherry picked from commit f988c97564f9ecf4b78f4e935e2cfc4ca1b6db0e) Change-Id: Ib1bbdd9f671ab4c22cffdf379d3b9fd79a5a8736 Reviewed-on: http://git-master/r/57042 Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board.h1
-rw-r--r--arch/arm/mach-tegra/common.c15
2 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index d3907383b686..9f563a69c4f2 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -48,6 +48,7 @@ void __init tegra_protected_aperture_init(unsigned long aperture);
void tegra_move_framebuffer(unsigned long to, unsigned long from,
unsigned long size);
bool is_tegra_debug_uartport_hs(void);
+int get_tegra_uart_debug_port_id(void);
int arb_lost_recovery(int scl_gpio, int sda_gpio);
extern unsigned long tegra_bootloader_fb_start;
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 737913e6ca05..11b97ab45dee 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -113,6 +113,7 @@ void tegra_assert_system_reset(char mode, const char *cmd)
#endif
}
static int modem_id;
+static int debug_uart_port_id;
/* WARNING: There is implicit client of pllp_out3 like i2c, uart, dsi
* and so this clock (pllp_out3) should never be disabled.
@@ -384,11 +385,17 @@ early_param("core_edp_mv", tegra_pmu_core_edp);
static int __init tegra_debug_uartport(char *info)
{
- if (!strcmp(info, "hsport"))
+ char *p = info;
+ if (!strncmp(p, "hsport", 6))
is_tegra_debug_uart_hsport = true;
- else if (!strcmp(info, "lsport"))
+ else if (!strncmp(p, "lsport", 6))
is_tegra_debug_uart_hsport = false;
+ if (p[6] == ',')
+ debug_uart_port_id = memparse(p + 7, &p);
+ else
+ debug_uart_port_id = -1;
+
return 1;
}
@@ -397,6 +404,10 @@ bool is_tegra_debug_uartport_hs(void)
return is_tegra_debug_uart_hsport;
}
+int get_tegra_uart_debug_port_id(void)
+{
+ return debug_uart_port_id;
+}
__setup("debug_uartport=", tegra_debug_uartport);
void tegra_get_board_info(struct board_info *bi)