ARM: tegra: Add support to identify if image RCK
Ashwini Ghuge [Mon, 19 Mar 2012 11:51:38 +0000 (16:51 +0530)]
With this change, we can identify if system
enters RCK mode in kernel.

Bug 948270

Change-Id: I4240fd4171b6b71fbc5f1271f21a588d62db88b1
Signed-off-by: Ashwini Ghuge <aghuge@nvidia.com>
Reviewed-on: http://git-master/r/90914
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/board.h
arch/arm/mach-tegra/common.c

index e17ee87..6d5a93c 100644 (file)
@@ -139,6 +139,11 @@ enum audio_codec_type {
        audio_codec_wm8903,
 };
 
+enum image_type {
+       system_image = 0,
+       rck_image,
+};
+
 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);
@@ -159,5 +164,6 @@ int tegra_get_modem_id(void);
 enum power_supply_type get_power_supply_type(void);
 enum audio_codec_type get_audio_codec_type(void);
 int get_maximum_cpu_current_supported(void);
+enum image_type get_tegra_image_type(void);
 
 #endif
index 76d0c56..f9902cf 100644 (file)
@@ -143,6 +143,7 @@ void tegra_assert_system_reset(char mode, const char *cmd)
 static int modem_id;
 static int debug_uart_port_id;
 static enum audio_codec_type audio_codec_name;
+static enum image_type board_image_type = system_image;
 static int max_cpu_current;
 
 /* WARNING: There is implicit client of pllp_out3 like i2c, uart, dsi
@@ -582,6 +583,21 @@ int get_tegra_uart_debug_port_id(void)
 }
 __setup("debug_uartport=", tegra_debug_uartport);
 
+static int __init tegra_image_type(char *options)
+{
+       if (!strcmp(options, "RCK"))
+               board_image_type = rck_image;
+
+       return 0;
+}
+
+enum image_type get_tegra_image_type(void)
+{
+       return board_image_type;
+}
+
+__setup("image=", tegra_image_type);
+
 static int __init tegra_audio_codec_type(char *info)
 {
        char *p = info;