summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/edp.c
diff options
context:
space:
mode:
authorShardar Shariff Md <smohammed@nvidia.com>2013-10-17 12:18:18 +0530
committerShardar Mohammed <smohammed@nvidia.com>2013-10-21 06:12:39 -0700
commit7e0c0beecbdb96cf4087ad3a7f10e372a0d8e159 (patch)
treea060427716cb0a90dac5d414ed494a3bea0f959d /arch/arm/mach-tegra/edp.c
parentb0d979c91f815324afa2e978f805018310657b12 (diff)
arm: tegra: fuse: replace globals with functions
Replace globals tegra_sku_id, tegra_chip_id & tegra_bct_strapping with below functions u32 tegra_get_sku_id(void); u32 tegra_get_chip_id(void); u32 tegra_get_bct_strapping(void); Bug 1380004 Change-Id: I43eb2523e4af5d06bc1aa1f03c02c5168577878c Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com> Reviewed-on: http://git-master/r/300401 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/edp.c')
-rw-r--r--arch/arm/mach-tegra/edp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/edp.c b/arch/arm/mach-tegra/edp.c
index 03d1f8fc89ab..25a803cbd5ab 100644
--- a/arch/arm/mach-tegra/edp.c
+++ b/arch/arm/mach-tegra/edp.c
@@ -263,7 +263,7 @@ static int edp_find_speedo_idx(int cpu_speedo_id, unsigned int *cpu_speedo_idx)
int i, array_size;
struct tegra_edp_cpu_leakage_params *params;
- switch (tegra_chip_id) {
+ switch (tegra_get_chip_id()) {
case TEGRA_CHIPID_TEGRA11:
params = tegra11x_get_leakage_params(0, &array_size);
break;
@@ -313,7 +313,7 @@ static int init_cpu_edp_limits_calculated(void)
if (ret)
return ret;
- switch (tegra_chip_id) {
+ switch (tegra_get_chip_id()) {
case TEGRA_CHIPID_TEGRA11:
params = tegra11x_get_leakage_params(cpu_speedo_idx, NULL);
break;
@@ -448,6 +448,9 @@ static int init_cpu_edp_limits_calculated(void)
void tegra_recalculate_cpu_edp_limits(void)
{
+ u32 tegra_chip_id;
+
+ tegra_chip_id = tegra_get_chip_id();
if (tegra_chip_id != TEGRA_CHIPID_TEGRA11 &&
tegra_chip_id != TEGRA_CHIPID_TEGRA14 &&
tegra_chip_id != TEGRA_CHIPID_TEGRA12)
@@ -474,7 +477,7 @@ void __init tegra_init_cpu_edp_limits(unsigned int regulator_mA)
goto end;
regulator_cur = regulator_mA + OVERRIDE_DEFAULT;
- switch (tegra_chip_id) {
+ switch (tegra_get_chip_id()) {
case TEGRA_CHIPID_TEGRA11:
case TEGRA_CHIPID_TEGRA14:
case TEGRA_CHIPID_TEGRA12:
@@ -653,7 +656,9 @@ static int edp_reg_override_write(struct file *file,
char buf[32], *end;
unsigned int edp_reg_override_mA_temp;
unsigned int edp_reg_override_mA_prev = edp_reg_override_mA;
+ u32 tegra_chip_id;
+ tegra_chip_id = tegra_get_chip_id();
if (!(tegra_chip_id == TEGRA_CHIPID_TEGRA11 ||
tegra_chip_id == TEGRA_CHIPID_TEGRA14 ||
tegra_chip_id == TEGRA_CHIPID_TEGRA12))