]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
arm: tegra12: enable dram temperature only for LPDDR2
authorShreshtha Sahu <ssahu@nvidia.com>
Mon, 24 Mar 2014 06:15:25 +0000 (11:45 +0530)
committerBharat Nihalani <bnihalani@nvidia.com>
Wed, 2 Apr 2014 04:11:36 +0000 (21:11 -0700)
This patch disables creating debugfs entry for non
LP DRAM variants. As currently two DRAM variants are
supported i.e. LPDDR2 and DDR3, so it enables dram
temperature entry only for LPDDR2.

Bug 1473611

Change-Id: I3b9ef616e5110a09f06522d761549f6db4bd578d
Signed-off-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/385488
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
arch/arm/mach-tegra/tegra12_emc.c

index 7628afbdc0d3654c597023cd7a0c9ea61f6596bb..16acbc94d293bf10d64a08a9d23e74ab7bf466b3 100644 (file)
@@ -2091,8 +2091,13 @@ static int __init tegra_emc_debug_init(void)
                emc_debugfs_root, (u32 *)&clkchange_delay))
                goto err_out;
 
-       if (!debugfs_create_file("dram_temperature", S_IRUGO, emc_debugfs_root,
-                                NULL, &dram_temperature_fops))
+       /*
+        * Reading dram temperature supported only for LP DDR variants,
+        * Currently two variants of DDR are supported i.e. LPDDR2 and DDR3
+        */
+       if (dram_type == DRAM_TYPE_LPDDR2 &&
+               !debugfs_create_file("dram_temperature",
+               S_IRUGO, emc_debugfs_root, NULL, &dram_temperature_fops))
                goto err_out;
 
        if (!debugfs_create_file("over_temp_state", S_IRUGO | S_IWUSR,