ARM: tegra: dvfs: Removed rail dfll mode thermal trips
Alex Frid [Sat, 20 Apr 2013 23:32:50 +0000 (16:32 -0700)]
Removed separate set of trip-points for rail cooling device in dfll
mode. Used the same set as in pll mode. No need for two sets, and rail
thermal code had required them to be identical, anyway (bailed out
with WARN if requirement was violated).

Change-Id: Icf4b12736794cd5b5fabad8a01186c176689df07
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/221347
(cherry picked from commit 5df0fb6eb46a68cb9fb6d1bb71240d71119ff3ce)
Reviewed-on: http://git-master/r/221865
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

arch/arm/mach-tegra/board-common.c
arch/arm/mach-tegra/dvfs.c
arch/arm/mach-tegra/dvfs.h
arch/arm/mach-tegra/tegra11_dvfs.c
arch/arm/mach-tegra/tegra_cl_dvfs.c

index 967bf51..54d0414 100644 (file)
@@ -166,7 +166,6 @@ static void tegra_add_trip_points(struct thermal_trip_info *trips,
 
 void tegra_add_cdev_trips(struct thermal_trip_info *trips, int *num_trips)
 {
-       tegra_add_trip_points(trips, num_trips, tegra_dvfs_get_cpu_dfll_cdev());
        tegra_add_trip_points(trips, num_trips, tegra_dvfs_get_cpu_pll_cdev());
        tegra_add_trip_points(trips, num_trips, tegra_dvfs_get_core_cdev());
 }
index 1114379..1f37a4c 100644 (file)
@@ -65,10 +65,7 @@ void tegra_dvfs_add_relationships(struct dvfs_relationship *rels, int n)
        mutex_unlock(&dvfs_lock);
 }
 
-/*
- * Make sure that DFLL and PLL mode cooling devices have identical set of
- * trip-points (needed for DFLL/PLL auto-switch) and matching thermal floors.
- */
+/* Make sure there is a matching cooling device for thermal limit profile. */
 static void dvfs_validate_cdevs(struct dvfs_rail *rail)
 {
        if (!rail->therm_mv_floors != !rail->therm_mv_floors_num) {
@@ -88,14 +85,6 @@ static void dvfs_validate_cdevs(struct dvfs_rail *rail)
 
        if (rail->therm_mv_floors && !rail->pll_mode_cdev)
                WARN(1, "%s: missing pll mode cooling device\n", rail->reg_id);
-
-       if (rail->dfll_mode_cdev) {
-               if (rail->dfll_mode_cdev != rail->pll_mode_cdev) {
-                       rail->dfll_mode_cdev = NULL;
-                       WARN(1, "%s: not matching dfll/pll mode trip-points\n",
-                            rail->reg_id);
-               }
-       }
 }
 
 int tegra_dvfs_init_rails(struct dvfs_rail *rails[], int n)
@@ -877,15 +866,6 @@ int tegra_dvfs_dfll_mode_clear(struct dvfs *d, unsigned long rate)
        return ret;
 }
 
-struct tegra_cooling_device *tegra_dvfs_get_cpu_dfll_cdev(void)
-{
-       /* dfll mode need its own trips only if they are different */
-       if (tegra_cpu_rail &&
-           (tegra_cpu_rail->dfll_mode_cdev != tegra_cpu_rail->pll_mode_cdev))
-               return tegra_cpu_rail->dfll_mode_cdev;
-       return NULL;
-}
-
 struct tegra_cooling_device *tegra_dvfs_get_cpu_pll_cdev(void)
 {
        if (tegra_cpu_rail)
index 857258e..d38f8a8 100644 (file)
@@ -85,7 +85,6 @@ struct dvfs_rail {
        bool dfll_mode_updating;
        int thermal_idx;
        struct tegra_cooling_device *pll_mode_cdev;
-       struct tegra_cooling_device *dfll_mode_cdev;
        struct rail_stats stats;
 };
 
@@ -220,7 +219,6 @@ int tegra_cpu_dvfs_alter(int edp_thermal_index, const cpumask_t *cpus,
                         bool before_clk_update, int cpu_event);
 int tegra_dvfs_dfll_mode_set(struct dvfs *d, unsigned long rate);
 int tegra_dvfs_dfll_mode_clear(struct dvfs *d, unsigned long rate);
-struct tegra_cooling_device *tegra_dvfs_get_cpu_dfll_cdev(void);
 struct tegra_cooling_device *tegra_dvfs_get_cpu_pll_cdev(void);
 struct tegra_cooling_device *tegra_dvfs_get_core_cdev(void);
 int tegra_dvfs_rail_dfll_mode_set_cold(struct dvfs_rail *rail);
index 41aabe8..b123801 100644 (file)
@@ -446,8 +446,6 @@ static void __init init_rail_thermal_profile(
        if (rail->pll_mode_cdev) {
                rail->pll_mode_cdev->trip_temperatures_num = i + 1;
                rail->pll_mode_cdev->trip_temperatures = therm_trips_table;
-               if (d)
-                       rail->dfll_mode_cdev = rail->pll_mode_cdev;
        }
 }
 
index 901b19f..90e363e 100644 (file)
@@ -1220,7 +1220,7 @@ static int __init tegra_cl_dvfs_probe(struct platform_device *pdev)
        cld->dfll_clk = dfll_clk;
        cld->safe_dvfs = safe_dvfs_clk->dvfs;
 #ifdef CONFIG_THERMAL
-       cld->cdev = cld->safe_dvfs->dvfs_rail->dfll_mode_cdev;
+       cld->cdev = cld->safe_dvfs->dvfs_rail->pll_mode_cdev;
        INIT_WORK(&cld->init_cdev_work, tegra_cl_dvfs_init_cdev);
 #endif
        /* Initialize cl_dvfs */