diff options
author | Matt Wagner <mwagner@nvidia.com> | 2012-12-11 21:03:10 -0800 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-12-18 15:42:31 -0800 |
commit | 2715cada53c70bcb7d1ccfe719a9741a6a1a542a (patch) | |
tree | ff6a7209f416abef29031196da31c138606ac85c /arch/arm/mach-tegra | |
parent | 550e05b1777990d885e32902a799dbce903150ae (diff) |
ARM: Tegra: Common: Add Roth Related Board Types
Add commandline board_info parsing for boards
present on Roth
Bug 1186719
Change-Id: I6743798c615dae6f66461cc39bd666daa7a2f6f9
Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Reviewed-on: http://git-master/r/170345
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-tegra/common.c | 95 |
2 files changed, 100 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h index 4c1d0a5d46ec..acbbffe5f6da 100644 --- a/arch/arm/mach-tegra/board.h +++ b/arch/arm/mach-tegra/board.h @@ -174,6 +174,11 @@ void tegra_get_board_info(struct board_info *); void tegra_get_pmu_board_info(struct board_info *bi); void tegra_get_display_board_info(struct board_info *bi); void tegra_get_camera_board_info(struct board_info *bi); +void tegra_get_io_board_info(struct board_info *bi); +void tegra_get_button_board_info(struct board_info *bi); +void tegra_get_joystick_board_info(struct board_info *bi); +void tegra_get_rightspeaker_board_info(struct board_info *bi); +void tegra_get_leftspeaker_board_info(struct board_info *bi); int tegra_get_board_panel_id(void); int get_core_edp(void); diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 2f9390226ca6..a570e8d9a3c2 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -128,6 +128,11 @@ static struct board_info pmu_board_info; static struct board_info display_board_info; static int panel_id; static struct board_info camera_board_info; +static struct board_info io_board_info; +static struct board_info button_board_info; +static struct board_info joystick_board_info; +static struct board_info rightspeaker_board_info; +static struct board_info leftspeaker_board_info; static int pmu_core_edp; static int board_panel_type; @@ -1083,6 +1088,96 @@ void tegra_get_camera_board_info(struct board_info *bi) __setup("cameraboard=", tegra_camera_board_info); +static int __init tegra_leftspeaker_board_info(char *info) +{ + char *p = info; + leftspeaker_board_info.board_id = memparse(p, &p); + leftspeaker_board_info.sku = memparse(p+1, &p); + leftspeaker_board_info.fab = memparse(p+1, &p); + leftspeaker_board_info.major_revision = memparse(p+1, &p); + leftspeaker_board_info.minor_revision = memparse(p+1, &p); + return 1; +} + +void tegra_get_leftspeaker_board_info(struct board_info *bi) +{ + memcpy(bi, &leftspeaker_board_info, sizeof(struct board_info)); +} + +__setup("leftspeakerboard=", tegra_leftspeaker_board_info); + +static int __init tegra_rightspeaker_board_info(char *info) +{ + char *p = info; + rightspeaker_board_info.board_id = memparse(p, &p); + rightspeaker_board_info.sku = memparse(p+1, &p); + rightspeaker_board_info.fab = memparse(p+1, &p); + rightspeaker_board_info.major_revision = memparse(p+1, &p); + rightspeaker_board_info.minor_revision = memparse(p+1, &p); + return 1; +} + +void tegra_get_rightspeaker_board_info(struct board_info *bi) +{ + memcpy(bi, &rightspeaker_board_info, sizeof(struct board_info)); +} + +__setup("rightspeakerboard=", tegra_rightspeaker_board_info); + +static int __init tegra_joystick_board_info(char *info) +{ + char *p = info; + joystick_board_info.board_id = memparse(p, &p); + joystick_board_info.sku = memparse(p+1, &p); + joystick_board_info.fab = memparse(p+1, &p); + joystick_board_info.major_revision = memparse(p+1, &p); + joystick_board_info.minor_revision = memparse(p+1, &p); + return 1; +} + +void tegra_get_joystick_board_info(struct board_info *bi) +{ + memcpy(bi, &joystick_board_info, sizeof(struct board_info)); +} + +__setup("joystickboard=", tegra_joystick_board_info); + +static int __init tegra_button_board_info(char *info) +{ + char *p = info; + button_board_info.board_id = memparse(p, &p); + button_board_info.sku = memparse(p+1, &p); + button_board_info.fab = memparse(p+1, &p); + button_board_info.major_revision = memparse(p+1, &p); + button_board_info.minor_revision = memparse(p+1, &p); + return 1; +} + +void tegra_get_button_board_info(struct board_info *bi) +{ + memcpy(bi, &button_board_info, sizeof(struct board_info)); +} + +__setup("buttonboard=", tegra_button_board_info); + +static int __init tegra_io_board_info(char *info) +{ + char *p = info; + io_board_info.board_id = memparse(p, &p); + io_board_info.sku = memparse(p+1, &p); + io_board_info.fab = memparse(p+1, &p); + io_board_info.major_revision = memparse(p+1, &p); + io_board_info.minor_revision = memparse(p+1, &p); + return 1; +} + +void tegra_get_io_board_info(struct board_info *bi) +{ + memcpy(bi, &io_board_info, sizeof(struct board_info)); +} + +__setup("ioboard=", tegra_io_board_info); + static int __init tegra_modem_id(char *id) { char *p = id; |