ARM: tegra: loki: don't init b00 memory
Ray Poudrier [Thu, 10 Oct 2013 00:07:56 +0000 (17:07 -0700)]
Initializing the a00 mem table on b00 will hang

Bug 1326949

Change-Id: Iba471bad27a5d00b291d2cda6d70f98a515d198d
Signed-off-by: Ray Poudrier <rapoudrier@nvidia.com>
Reviewed-on: http://git-master/r/289258
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Tao Xie <txie@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

arch/arm/mach-tegra/board-loki-memory.c
arch/arm/mach-tegra/tegra-board-id.h

index 9c7c1e9..262f07a 100644 (file)
@@ -2737,8 +2737,24 @@ static struct tegra12_emc_pdata loki_emc_pdata = {
 
 int __init loki_emc_init(void)
 {
-       pr_info("Loading loki EMC tables.\n");
-       tegra_emc_device.dev.platform_data = &loki_emc_pdata;
+       struct board_info bi;
+
+       tegra_get_board_info(&bi);
+
+       if (bi.board_id == BOARD_E2548) {
+               switch (bi.sku) {
+               case 0x0:
+                       pr_info("Loading loki EMC tables.\n");
+                       tegra_emc_device.dev.platform_data = &loki_emc_pdata;
+                       break;
+               default:
+                       WARN(1, "B00 EMC not yet supported: %u\n", bi.sku);
+                       return -EINVAL;
+               }
+       } else {
+               WARN(1, "B00 EMC not yet supported: %u\n", bi.sku);
+               return -EINVAL;
+       }
        platform_device_register(&tegra_emc_device);
        tegra12_emc_init();
        return 0;
index e7bb72a..0647ac6 100644 (file)
@@ -49,6 +49,9 @@
 #define BOARD_PM358   0x0166
 #define BOARD_PM359   0x0167
 #define BOARD_PM363   0x016B
+#define BOARD_E2548   0x09F4
+#define BOARD_E2549   0x09F5
+
 
 /* Panel board ID */
 #define    BOARD_E1605    0x0645
@@ -63,7 +66,6 @@
 #define    BOARD_E1549    0x060D
 
 #define    BOARD_E1563    0x061b
-#define BOARD_P2560   0x0A00
 
 
 /* PMIC board ID */