summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/include/mach/latency_allowance.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/include/mach/latency_allowance.h')
-rw-r--r--arch/arm/mach-tegra/include/mach/latency_allowance.h121
1 files changed, 121 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/latency_allowance.h b/arch/arm/mach-tegra/include/mach/latency_allowance.h
new file mode 100644
index 000000000000..f0d27f0b8ba9
--- /dev/null
+++ b/arch/arm/mach-tegra/include/mach/latency_allowance.h
@@ -0,0 +1,121 @@
+/*
+ * arch/arm/mach-tegra/include/mach/latency_allowance.h
+ *
+ * Copyright (C) 2011, NVIDIA Corporation.
+ *
+ * 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.
+ *
+ */
+
+#ifndef _MACH_TEGRA_LATENCY_ALLOWANCE_H_
+#define _MACH_TEGRA_LATENCY_ALLOWANCE_H_
+
+enum tegra_la_id {
+ TEGRA_LA_AFIR = 0,
+ TEGRA_LA_AFIW,
+ TEGRA_LA_AVPC_ARM7R,
+ TEGRA_LA_AVPC_ARM7W,
+ TEGRA_LA_DISPLAY_0A,
+ TEGRA_LA_DISPLAY_0B,
+ TEGRA_LA_DISPLAY_0C,
+ TEGRA_LA_DISPLAY_1B,
+ TEGRA_LA_DISPLAY_HC,
+ TEGRA_LA_DISPLAY_0AB,
+ TEGRA_LA_DISPLAY_0BB,
+ TEGRA_LA_DISPLAY_0CB,
+ TEGRA_LA_DISPLAY_1BB,
+ TEGRA_LA_DISPLAY_HCB,
+ TEGRA_LA_EPPUP,
+ TEGRA_LA_EPPU,
+ TEGRA_LA_EPPV,
+ TEGRA_LA_EPPY,
+ TEGRA_LA_G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FORM)
+static inline int tegra_set_latency_allowance(enum tegra_la_id id,
+ int bandwidth_in_mbps)
+{
+ return 0;
+}
+
+static inline int tegra_enable_latency_scaling(enum tegra_la_id id,
+ unsigned int threshold_low,
+ unsigned int threshold_mid,
+ unsigned int threshold_high)
+{
+ return 0;
+}
+
+static inline void tegra_disable_latency_scaling(enum tegra_la_id id)
+{
+ return 0;
+}
+#else
+int tegra_set_latency_allowance(enum tegra_la_id id,
+ unsigned int bandwidth_in_mbps);
+
+int tegra_enable_latency_scaling(enum tegra_la_id id,
+ unsigned int threshold_low,
+ unsigned int threshold_mid,
+ unsigned int threshold_high);
+
+void tegra_disable_latency_scaling(enum tegra_la_id id);
+#endif
+
+#endif /* _MACH_TEGRA_LATENCY_ALLOWANCE_H_ */