From 2ed661fb6306e6e078dec5684aed1443364c791b Mon Sep 17 00:00:00 2001 From: Diwakar Tundlam Date: Sun, 16 Dec 2012 12:13:37 -0800 Subject: arm: tegra: soctherm: Register soctherm device as CPU zone Add registration of soctherm device for CPU zone temperature monitoring and bind it to the CPU-therm cooling device. Also register the balanced throttling table for CPU frequency throttling from the CPU-therm temperature monitoring zone. Bug 1200075 Change-Id: I8df8c896b87a85a769e15b15f13e4b2c420d7662 Signed-off-by: Diwakar Tundlam Reviewed-on: http://git-master/r/172056 (cherry picked from commit 13ed2c97a3fb6a54fb4d0f503e15580af3a91976) Reviewed-on: http://git-master/r/190103 Reviewed-by: Harshada Kale Tested-by: Harshada Kale --- arch/arm/mach-tegra/tegra11_soctherm.h | 71 ++++++++++++++++------------------ 1 file changed, 34 insertions(+), 37 deletions(-) (limited to 'arch/arm/mach-tegra/tegra11_soctherm.h') diff --git a/arch/arm/mach-tegra/tegra11_soctherm.h b/arch/arm/mach-tegra/tegra11_soctherm.h index 6922a5981b3f..b3394fd33e60 100644 --- a/arch/arm/mach-tegra/tegra11_soctherm.h +++ b/arch/arm/mach-tegra/tegra11_soctherm.h @@ -1,48 +1,46 @@ /* - * arch/arm/mach-tegra/tegra3_tsensor.h + * arch/arm/mach-tegra/tegra11_soctherm.h * - * Tegra tsensor header file + * Copyright (C) 2011-2012 NVIDIA Corporation * - * Copyright (c) 2011, NVIDIA Corporation. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#ifndef __MACH_TEGRA_TEGRA3_SOCTHERM_H -#define __MACH_TEGRA_TEGRA3_SOCTHERM_H - -#include - enum soctherm_sense { TSENSE_CPU0 = 0, - TSENSE_CPU1 = 1, - TSENSE_CPU2 = 2, - TSENSE_CPU3 = 3, - TSENSE_MEM0 = 4, - TSENSE_MEM1 = 5, - TSENSE_GPU = 6, - TSENSE_PLLX = 7, - TSENSE_SIZE = 8, + TSENSE_CPU1, + TSENSE_CPU2, + TSENSE_CPU3, + TSENSE_MEM0, + TSENSE_MEM1, + TSENSE_GPU, + TSENSE_PLLX, + TSENSE_SIZE, }; enum soctherm_therm_id { THERM_CPU = 0, - THERM_MEM = 1, - THERM_GPU = 2, - THERM_PLL = 3, - THERM_SIZE = 4, + THERM_MEM, + THERM_GPU, + THERM_PLL, + THERM_SIZE, }; struct soctherm_sensor { - bool enable; + bool sensor_enable; + bool zone_enable; int tall; int tiddq; int ten_count; @@ -51,26 +49,27 @@ struct soctherm_sensor { }; struct soctherm_therm { + bool zone_enable; s8 thermtrip; s8 hw_backstop; - struct thermal_cooling_device *cdev; + char *cdev_type; int trip_temp; - int tc1; - int tc2; int passive_delay; + int etemp; + int hysteresis; }; enum soctherm_throttle_id { THROTTLE_LITE = 0, - THROTTLE_HEAVY = 1, - THROTTLE_SIZE = 2, + THROTTLE_HEAVY, + THROTTLE_SIZE, }; enum soctherm_throttle_dev_id { THROTTLE_DEV_CPU = 0, - THROTTLE_DEV_GPU = 1, - THROTTLE_DEV_SIZE = 2, + THROTTLE_DEV_GPU, + THROTTLE_DEV_SIZE, }; struct soctherm_throttle_dev { @@ -106,5 +105,3 @@ static inline int tegra11_soctherm_init(struct soctherm_platform_data *data) return 0; } #endif - -#endif -- cgit v1.2.3