summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRobert Morell <rmorell@nvidia.com>2011-05-19 09:31:45 -0700
committerNiket Sirsi <nsirsi@nvidia.com>2011-05-23 17:03:05 -0700
commitd016dca9f18c1f7c3b03fe86d028a40c196cdf01 (patch)
treec368d2f14a3ffd788613acd18d0096ca0aae095f /arch
parentdedd6a4d41c81333c54fd40b746d8189af2188c4 (diff)
arm: tegra: Declare tegra_throttling_enable in .h
The build currently fails for some boards when CONFIG_CPU_FREQ=n, since we don't build cpu-tegra.c but tegra_throttling_enable is still referenced. To fix this: - Add cpu-tegra.h - Define tegra_throttling_enable to NULL in the header if either CONFIG_CPU_FREQ or CONFIG_TEGRA_THERMAL_THROTTLE are not set - Use the header file instead of declaring the function extern everywhere it's used Bug 829501 Change-Id: Ice84309546dee201f991a1194fefd80583afc455 Signed-off-by: Robert Morell <rmorell@nvidia.com> Reviewed-on: http://git-master/r/32208 Reviewed-by: Allen R Martin <amartin@nvidia.com> Reviewed-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-cardhu-sensors.c3
-rw-r--r--arch/arm/mach-tegra/board-ventana-sensors.c3
-rw-r--r--arch/arm/mach-tegra/board-whistler-sensors.c3
-rw-r--r--arch/arm/mach-tegra/cpu-tegra.c4
-rw-r--r--arch/arm/mach-tegra/cpu-tegra.h30
5 files changed, 33 insertions, 10 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c
index 094db0a20eae..6108c2b2b408 100644
--- a/arch/arm/mach-tegra/board-cardhu-sensors.c
+++ b/arch/arm/mach-tegra/board-cardhu-sensors.c
@@ -39,6 +39,7 @@
#include "gpio-names.h"
#include "board-cardhu.h"
+#include "cpu-tegra.h"
static struct regulator *cardhu_1v8_cam1 = NULL;
static struct regulator *cardhu_1v8_cam2 = NULL;
@@ -429,8 +430,6 @@ static struct i2c_board_info cardhu_i2c8_board_info[] = {
},
};
-extern void tegra_throttling_enable(bool enable);
-
static struct nct1008_platform_data cardhu_nct1008_pdata = {
.supported_hwrev = true,
.ext_range = false,
diff --git a/arch/arm/mach-tegra/board-ventana-sensors.c b/arch/arm/mach-tegra/board-ventana-sensors.c
index 6bc3d7d38bcd..b7173ceccf50 100644
--- a/arch/arm/mach-tegra/board-ventana-sensors.c
+++ b/arch/arm/mach-tegra/board-ventana-sensors.c
@@ -38,6 +38,7 @@
#include "gpio-names.h"
#include "board.h"
#include "board-ventana.h"
+#include "cpu-tegra.h"
#define ISL29018_IRQ_GPIO TEGRA_GPIO_PZ2
#define AKM8975_IRQ_GPIO TEGRA_GPIO_PN5
@@ -52,8 +53,6 @@
#define CAMERA_FLASH_MAX_TORCH_AMP 11
#define CAMERA_FLASH_MAX_FLASH_AMP 31
-extern void tegra_throttling_enable(bool enable);
-
static int ventana_camera_init(void)
{
tegra_gpio_enable(CAMERA_POWER_GPIO);
diff --git a/arch/arm/mach-tegra/board-whistler-sensors.c b/arch/arm/mach-tegra/board-whistler-sensors.c
index 6d8037f58759..853ac62391fc 100644
--- a/arch/arm/mach-tegra/board-whistler-sensors.c
+++ b/arch/arm/mach-tegra/board-whistler-sensors.c
@@ -29,6 +29,7 @@
#include <generated/mach-types.h>
#include "gpio-names.h"
+#include "cpu-tegra.h"
#define CAMERA1_PWDN_GPIO TEGRA_GPIO_PT2
#define CAMERA1_RESET_GPIO TEGRA_GPIO_PD2
@@ -42,8 +43,6 @@
#define ISL29018_IRQ_GPIO TEGRA_GPIO_PK2
#define ADT7461_IRQ_GPIO TEGRA_GPIO_PI2
-extern void tegra_throttling_enable(bool enable);
-
static struct regulator *reg_avdd_cam1; /* LDO9 */
static struct regulator *reg_vdd_af; /* LDO13 */
static struct regulator *reg_vdd_mipi; /* LDO17 */
diff --git a/arch/arm/mach-tegra/cpu-tegra.c b/arch/arm/mach-tegra/cpu-tegra.c
index c501af7f897c..2d19d6aacc8d 100644
--- a/arch/arm/mach-tegra/cpu-tegra.c
+++ b/arch/arm/mach-tegra/cpu-tegra.c
@@ -186,10 +186,6 @@ module_exit(tegra_cpu_debug_exit);
#else /* CONFIG_TEGRA_THERMAL_THROTTLE */
#define tegra_cpu_is_throttling() (0)
#define throttle_governor_speed(requested_speed) (requested_speed)
-
-void tegra_throttling_enable(bool enable)
-{
-}
#endif /* CONFIG_TEGRA_THERMAL_THROTTLE */
#ifdef CONFIG_TEGRA_EDP_LIMITS
diff --git a/arch/arm/mach-tegra/cpu-tegra.h b/arch/arm/mach-tegra/cpu-tegra.h
new file mode 100644
index 000000000000..6c6e40a9fce9
--- /dev/null
+++ b/arch/arm/mach-tegra/cpu-tegra.h
@@ -0,0 +1,30 @@
+/*
+ * arch/arm/mach-tegra/cpu-tegra.h
+ *
+ * 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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_CPU_TEGRA_H
+#define __MACH_TEGRA_CPU_TEGRA_H
+
+#ifdef CONFIG_TEGRA_THERMAL_THROTTLE
+void tegra_throttling_enable(bool enable);
+#else
+#define tegra_throttling_enable NULL
+#endif /* CONFIG_TEGRA_THERMAL_THROTTLE */
+
+#endif /* __MACH_TEGRA_CPU_TEGRA_H */