summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-09-19 10:49:00 +0530
committerRohan Somvanshi <rsomvanshi@nvidia.com>2011-09-20 06:02:00 -0700
commit6be4ec9c40e6422b015ad92de67fb9488ccfcd48 (patch)
treeab4a9bb0ae32002a098d1ae22bb35792b74b5ca2
parentc36fa84231e272387f090947eb9c8ff0458b47e0 (diff)
arm: tegra: Handler for kernel command option personality
Adding the handler to parse the kernel command option "personality". bug 870313 Change-Id: Ia90e9039b77974ea1b5c5a2a1ae40badefc7c18e Reviewed-on: http://git-master/r/53124 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Tested-by: Gerrit_Virtual_Submit
-rw-r--r--arch/arm/mach-tegra/board.h1
-rwxr-xr-xarch/arm/mach-tegra/common.c16
2 files changed, 16 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index 89d345ccb14d..0d425e2023e7 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -67,5 +67,6 @@ struct board_info {
};
void tegra_get_board_info(struct board_info *);
+unsigned long get_board_personality(void);
#endif
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 5c3ad20d95a5..d9c3142fd81b 100755
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -86,6 +86,7 @@ unsigned long tegra_lp0_vec_size;
bool tegra_lp0_vec_relocate;
unsigned long tegra_grhost_aperture;
static bool is_tegra_debug_uart_hsport;
+static unsigned long board_personality;
static struct board_info tegra_board_info = {
.board_id = -1,
@@ -363,9 +364,22 @@ bool is_tegra_debug_uartport_hs(void)
{
return is_tegra_debug_uart_hsport;
}
-
__setup("debug_uartport=", tegra_debug_uartport);
+static int __init tegra_board_personality(char *info)
+{
+ char *p = info;
+ board_personality = memparse(p, &p);
+ return 1;
+}
+
+unsigned long get_board_personality(void)
+{
+ return board_personality;
+}
+
+__setup("personality=", tegra_board_personality);
+
void tegra_get_board_info(struct board_info *bi)
{
memcpy(bi, &tegra_board_info, sizeof(*bi));