diff options
author | Diwakar Tundlam <dtundlam@nvidia.com> | 2013-01-29 16:44:32 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 12:56:48 -0700 |
commit | 3421460882ded635fe91b6a112777d8292a8856e (patch) | |
tree | 491b689cbff9876612b40cbb61640bc0606627f8 /arch/arm/mach-tegra | |
parent | 8a26199989ad5fdd21f2f16f557b97a6b227e1cb (diff) |
arm: tegra: Move all tj dependent thermals from nct to soc_therm
Functions moved are vdd_cpu, core edp. Raised shutdown limit for nct.
Added two higher temps for cpu_edp to support higher soc_therm temps.
Doing this only for Dalmore, Pluto, Ceres, Pismo.
No real changes to Roth.
Bug 1200075
Change-Id: I2b4ac4ba7cd933bd47c30ab2ad9eabb3a3da5fbe
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/195331
(cherry picked from commit 2af79db3c5763d3a0b6e78663ccf1ad6c04be134)
Reviewed-on: http://git-master/r/197096
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r-- | arch/arm/mach-tegra/board-common.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-dalmore-power.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-dalmore-sensors.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-pismo-power.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-pismo-sensors.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-pluto-power.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-pluto-sensors.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-roth-power.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-roth-sensors.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/cpu-tegra.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/edp.c | 4 |
12 files changed, 44 insertions, 71 deletions
diff --git a/arch/arm/mach-tegra/board-common.c b/arch/arm/mach-tegra/board-common.c index db7e2576b306..cb6923941a52 100644 --- a/arch/arm/mach-tegra/board-common.c +++ b/arch/arm/mach-tegra/board-common.c @@ -166,8 +166,12 @@ 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_core_edp_get_cdev()); 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()); } + +void tegra_add_tj_trips(struct thermal_trip_info *trips, int *num_trips) +{ + tegra_add_trip_points(trips, num_trips, tegra_core_edp_get_cdev()); +} diff --git a/arch/arm/mach-tegra/board-common.h b/arch/arm/mach-tegra/board-common.h index 408552e786be..11f1622af67f 100644 --- a/arch/arm/mach-tegra/board-common.h +++ b/arch/arm/mach-tegra/board-common.h @@ -28,4 +28,5 @@ extern struct platform_device *uart_console_debug_device; int uart_console_debug_init(int defaul_debug_port); int tegra_vibrator_init(void); void tegra_add_cdev_trips(struct thermal_trip_info *trips, int *num_trips); +void tegra_add_tj_trips(struct thermal_trip_info *trips, int *num_trips); #endif diff --git a/arch/arm/mach-tegra/board-dalmore-power.c b/arch/arm/mach-tegra/board-dalmore-power.c index b6e55d0590d2..c322f3639b44 100644 --- a/arch/arm/mach-tegra/board-dalmore-power.c +++ b/arch/arm/mach-tegra/board-dalmore-power.c @@ -47,6 +47,7 @@ #include "tegra-board-id.h" #include "board.h" #include "gpio-names.h" +#include "board-common.h" #include "board-dalmore.h" #include "tegra_cl_dvfs.h" #include "devices.h" @@ -1184,21 +1185,21 @@ static struct soctherm_platform_data dalmore_soctherm_data = { .trips = { { .cdev_type = "tegra-balanced", - .trip_temp = 85000, + .trip_temp = 84000, .trip_type = THERMAL_TRIP_PASSIVE, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, }, { .cdev_type = "tegra-heavy", - .trip_temp = 95000, + .trip_temp = 94000, .trip_type = THERMAL_TRIP_HOT, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, }, { .cdev_type = "tegra-shutdown", - .trip_temp = 105000, + .trip_temp = 104000, .trip_type = THERMAL_TRIP_CRITICAL, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, @@ -1225,5 +1226,10 @@ static struct soctherm_platform_data dalmore_soctherm_data = { int __init dalmore_soctherm_init(void) { + tegra_platform_edp_init(dalmore_soctherm_data.therm[THERM_CPU].trips, + &dalmore_soctherm_data.therm[THERM_CPU].num_trips); + tegra_add_tj_trips(dalmore_soctherm_data.therm[THERM_CPU].trips, + &dalmore_soctherm_data.therm[THERM_CPU].num_trips); + return tegra11_soctherm_init(&dalmore_soctherm_data); } diff --git a/arch/arm/mach-tegra/board-dalmore-sensors.c b/arch/arm/mach-tegra/board-dalmore-sensors.c index b29ba75005ef..79c21d0dce94 100644 --- a/arch/arm/mach-tegra/board-dalmore-sensors.c +++ b/arch/arm/mach-tegra/board-dalmore-sensors.c @@ -113,24 +113,8 @@ static struct nct1008_platform_data dalmore_nct1008_pdata = { .supported_hwrev = true, .ext_range = true, .conv_rate = 0x08, - .offset = 0, - .shutdown_ext_limit = 85, /* C */ + .shutdown_ext_limit = 105, /* C */ .shutdown_local_limit = 120, /* C */ - - .passive_delay = 2000, - - .num_trips = 1, - .trips = { - /* Thermal Throttling */ - [0] = { - .cdev_type = "tegra-balanced", - .trip_temp = 75000, - .trip_type = THERMAL_TRIP_PASSIVE, - .upper = THERMAL_NO_LIMIT, - .lower = THERMAL_NO_LIMIT, - .hysteresis = 0, - }, - }, }; static struct i2c_board_info dalmore_i2c4_nct1008_board_info[] = { @@ -584,8 +568,6 @@ static int dalmore_nct1008_init(void) board_info.board_id); } - tegra_platform_edp_init(dalmore_nct1008_pdata.trips, - &dalmore_nct1008_pdata.num_trips); tegra_add_cdev_trips(dalmore_nct1008_pdata.trips, &dalmore_nct1008_pdata.num_trips); diff --git a/arch/arm/mach-tegra/board-pismo-power.c b/arch/arm/mach-tegra/board-pismo-power.c index 4d6d039be261..d8421712740f 100644 --- a/arch/arm/mach-tegra/board-pismo-power.c +++ b/arch/arm/mach-tegra/board-pismo-power.c @@ -40,6 +40,7 @@ #include "tegra-board-id.h" #include "board.h" #include "gpio-names.h" +#include "board-common.h" #include "board-pismo.h" #include "tegra_cl_dvfs.h" #include "devices.h" @@ -823,21 +824,21 @@ static struct soctherm_platform_data pismo_soctherm_data = { .trips = { { .cdev_type = "tegra-balanced", - .trip_temp = 85000, + .trip_temp = 84000, .trip_type = THERMAL_TRIP_PASSIVE, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, }, { .cdev_type = "tegra-heavy", - .trip_temp = 95000, + .trip_temp = 94000, .trip_type = THERMAL_TRIP_HOT, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, }, { .cdev_type = "tegra-shutdown", - .trip_temp = 105000, + .trip_temp = 104000, .trip_type = THERMAL_TRIP_CRITICAL, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, @@ -864,5 +865,10 @@ static struct soctherm_platform_data pismo_soctherm_data = { int __init pismo_soctherm_init(void) { + tegra_platform_edp_init(pismo_soctherm_data.therm[THERM_CPU].trips, + &pismo_soctherm_data.therm[THERM_CPU].num_trips); + tegra_add_tj_trips(pismo_soctherm_data.therm[THERM_CPU].trips, + &pismo_soctherm_data.therm[THERM_CPU].num_trips); + return tegra11_soctherm_init(&pismo_soctherm_data); } diff --git a/arch/arm/mach-tegra/board-pismo-sensors.c b/arch/arm/mach-tegra/board-pismo-sensors.c index 95f33865ab9b..134e70674ac9 100644 --- a/arch/arm/mach-tegra/board-pismo-sensors.c +++ b/arch/arm/mach-tegra/board-pismo-sensors.c @@ -102,23 +102,8 @@ static struct nct1008_platform_data pismo_nct1008_pdata = { .ext_range = true, .conv_rate = 0x08, .offset = 0, - .shutdown_ext_limit = 85, /* C */ + .shutdown_ext_limit = 105, /* C */ .shutdown_local_limit = 120, /* C */ - - .passive_delay = 2000, - - .num_trips = 1, - .trips = { - /* Thermal Throttling */ - [0] = { - .cdev_type = "pismo-nct", - .trip_temp = 75000, - .trip_type = THERMAL_TRIP_PASSIVE, - .upper = THERMAL_NO_LIMIT, - .lower = THERMAL_NO_LIMIT, - .hysteresis = 0, - }, - }, }; static struct i2c_board_info pismo_i2c4_nct1008_board_info[] = { @@ -555,8 +540,6 @@ static int pismo_nct1008_init(void) nct1008_port = TEGRA_GPIO_PX6; - tegra_platform_edp_init(pismo_nct1008_pdata.trips, - &pismo_nct1008_pdata.num_trips); tegra_add_cdev_trips(pismo_nct1008_pdata.trips, &pismo_nct1008_pdata.num_trips); diff --git a/arch/arm/mach-tegra/board-pluto-power.c b/arch/arm/mach-tegra/board-pluto-power.c index 6e15fd57529e..e56776529c9d 100644 --- a/arch/arm/mach-tegra/board-pluto-power.c +++ b/arch/arm/mach-tegra/board-pluto-power.c @@ -35,6 +35,7 @@ #include "cpu-tegra.h" #include "pm.h" #include "board.h" +#include "board-common.h" #include "board-pluto.h" #include "iomap.h" #include "tegra_cl_dvfs.h" @@ -725,21 +726,21 @@ static struct soctherm_platform_data pluto_soctherm_data = { .trips = { { .cdev_type = "tegra-balanced", - .trip_temp = 85000, + .trip_temp = 84000, .trip_type = THERMAL_TRIP_PASSIVE, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, }, { .cdev_type = "tegra-heavy", - .trip_temp = 95000, + .trip_temp = 94000, .trip_type = THERMAL_TRIP_HOT, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, }, { .cdev_type = "tegra-shutdown", - .trip_temp = 105000, + .trip_temp = 104000, .trip_type = THERMAL_TRIP_CRITICAL, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, @@ -766,5 +767,10 @@ static struct soctherm_platform_data pluto_soctherm_data = { int __init pluto_soctherm_init(void) { + tegra_platform_edp_init(pluto_soctherm_data.therm[THERM_CPU].trips, + &pluto_soctherm_data.therm[THERM_CPU].num_trips); + tegra_add_tj_trips(pluto_soctherm_data.therm[THERM_CPU].trips, + &pluto_soctherm_data.therm[THERM_CPU].num_trips); + return tegra11_soctherm_init(&pluto_soctherm_data); } diff --git a/arch/arm/mach-tegra/board-pluto-sensors.c b/arch/arm/mach-tegra/board-pluto-sensors.c index 79203683716e..dfb93a391fa7 100644 --- a/arch/arm/mach-tegra/board-pluto-sensors.c +++ b/arch/arm/mach-tegra/board-pluto-sensors.c @@ -332,23 +332,8 @@ static struct nct1008_platform_data pluto_nct1008_pdata = { .ext_range = true, .conv_rate = 0x08, .offset = 0, - .shutdown_ext_limit = 85, /* C */ + .shutdown_ext_limit = 105, /* C */ .shutdown_local_limit = 120, /* C */ - - .passive_delay = 2000, - - .num_trips = 1, - .trips = { - /* Thermal Throttling */ - [0] = { - .cdev_type = "tegra-balanced", - .trip_temp = 75000, - .trip_type = THERMAL_TRIP_PASSIVE, - .upper = THERMAL_NO_LIMIT, - .lower = THERMAL_NO_LIMIT, - .hysteresis = 0, - }, - }, }; static struct i2c_board_info pluto_i2c4_nct1008_board_info[] = { @@ -776,8 +761,6 @@ static int pluto_nct1008_init(void) board_info.board_id); } - tegra_platform_edp_init(pluto_nct1008_pdata.trips, - &pluto_nct1008_pdata.num_trips); tegra_add_cdev_trips(pluto_nct1008_pdata.trips, &pluto_nct1008_pdata.num_trips); diff --git a/arch/arm/mach-tegra/board-roth-power.c b/arch/arm/mach-tegra/board-roth-power.c index eb8a68135186..cddafc1236bf 100644 --- a/arch/arm/mach-tegra/board-roth-power.c +++ b/arch/arm/mach-tegra/board-roth-power.c @@ -708,21 +708,21 @@ static struct soctherm_platform_data roth_soctherm_data = { .trips = { { .cdev_type = "tegra-balanced", - .trip_temp = 85000, + .trip_temp = 84000, .trip_type = THERMAL_TRIP_PASSIVE, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, }, { .cdev_type = "tegra-heavy", - .trip_temp = 95000, + .trip_temp = 94000, .trip_type = THERMAL_TRIP_HOT, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, }, { .cdev_type = "tegra-shutdown", - .trip_temp = 105000, + .trip_temp = 104000, .trip_type = THERMAL_TRIP_CRITICAL, .upper = THERMAL_NO_LIMIT, .lower = THERMAL_NO_LIMIT, diff --git a/arch/arm/mach-tegra/board-roth-sensors.c b/arch/arm/mach-tegra/board-roth-sensors.c index 07391388ed3c..0ede5ec43520 100644 --- a/arch/arm/mach-tegra/board-roth-sensors.c +++ b/arch/arm/mach-tegra/board-roth-sensors.c @@ -230,6 +230,8 @@ static int roth_nct1008_init(void) &roth_nct1008_pdata.num_trips); tegra_add_cdev_trips(roth_nct1008_pdata.trips, &roth_nct1008_pdata.num_trips); + tegra_add_tj_trips(roth_nct1008_pdata.trips, + &roth_nct1008_pdata.num_trips); roth_i2c4_nct1008_board_info[0].irq = gpio_to_irq(nct1008_port); pr_info("%s: roth nct1008 irq %d", __func__, \ diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c index 90a0fe962b86..b53d5298a48a 100644 --- a/arch/arm/mach-tegra/cpu-tegra.c +++ b/arch/arm/mach-tegra/cpu-tegra.c @@ -278,7 +278,7 @@ static struct thermal_cooling_device_ops tegra_edp_cooling_ops = { static int __init edp_init(void) { thermal_cooling_device_register( - "edp", + "cpu_edp", NULL, &tegra_edp_cooling_ops); return 0; diff --git a/arch/arm/mach-tegra/edp.c b/arch/arm/mach-tegra/edp.c index 63f454365a08..26ea066c5f25 100644 --- a/arch/arm/mach-tegra/edp.c +++ b/arch/arm/mach-tegra/edp.c @@ -325,7 +325,7 @@ static struct tegra_edp_limits edp_default_limits[] = { }; /* Constants for EDP calculations */ -static int temperatures[] = { 23, 40, 50, 60, 70, 75, 80, 85, 90, 95 }; +static int temperatures[] = { 23, 40, 50, 60, 70, 75, 80, 85, 90, 95, 100, 105 }; static struct tegra_edp_cpu_leakage_params leakage_params[] = { { .cpu_speedo_id = 0, /* A01 CPU */ @@ -789,7 +789,7 @@ void tegra_platform_edp_init(struct thermal_trip_info *trips, int *num_trips) for (i = 0; i < cpu_edp_limits_size-1; i++) { trip_state = &trips[*num_trips]; - trip_state->cdev_type = "edp"; + trip_state->cdev_type = "cpu_edp"; trip_state->trip_temp = cpu_edp_limits[i].temperature * 1000; trip_state->trip_type = THERMAL_TRIP_ACTIVE; |