arm: tegra: roth: Set board revision in system_rev
Anshul Jain [Mon, 20 May 2013 22:21:38 +0000 (15:21 -0700)]
This change sets the board revision of roth in system_rev.
This board revision set the system prop "ro.revision".

Bug 1236715

Change-Id: I15fb3c8c61667e6197177e08abd540c14422f347
Signed-off-by: Anshul Jain <anshulj@nvidia.com>
(cherry picked from commit 1aadaf43c2585876c2c7fa89e565561809d4a69a)
Reviewed-on: http://git-master/r/229758
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

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

index 65d4459..2b2aa9c 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/i2c/at24.h>
 #include <linux/of_platform.h>
 #include <linux/usb/tegra_usb_phy.h>
+#include <asm/system_info.h>
 #include <asm/hardware/gic.h>
 
 #include <mach/clk.h>
@@ -652,6 +653,18 @@ static int __init roth_touch_init(void)
        return 0;
 }
 
+static int __init roth_revision_init(void)
+{
+       struct board_info board_info;
+       tegra_get_board_info(&board_info);
+       system_rev = 0;
+       if (board_info.board_id == BOARD_P2454)
+               system_rev = P2454;
+       else
+               system_rev = P2560;
+       return 0;
+}
+
 static void __init tegra_roth_init(void)
 {
        tegra_clk_init_from_table(roth_clk_init_table);
@@ -693,6 +706,7 @@ static void __init tegra_roth_init(void)
        roth_soctherm_init();
        roth_fan_init();
        tegra_register_fuse();
+       roth_revision_init();
 }
 
 static void __init roth_ramconsole_reserve(unsigned long size)
index 57ae204..81b1b79 100644 (file)
 #define MPU_COMPASS_BUS_NUM     0
 #define MPU_COMPASS_ORIENTATION { 0, 1, 0, -1, 0, 0, 0, 0, 1 }
 
+enum {
+       P2454 = 1,
+       P2560,
+};
 
 int roth_regulator_init(void);
 int roth_suspend_init(void);