aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/tegra/host/nvhost_acm.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/video/tegra/host/nvhost_acm.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'drivers/video/tegra/host/nvhost_acm.h')
-rw-r--r--drivers/video/tegra/host/nvhost_acm.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/drivers/video/tegra/host/nvhost_acm.h b/drivers/video/tegra/host/nvhost_acm.h
new file mode 100644
index 00000000000..a12c0c3fa32
--- /dev/null
+++ b/drivers/video/tegra/host/nvhost_acm.h
@@ -0,0 +1,60 @@
1/*
2 * drivers/video/tegra/host/nvhost_acm.h
3 *
4 * Tegra Graphics Host Automatic Clock Management
5 *
6 * Copyright (c) 2010-2012, NVIDIA Corporation.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License,
10 * version 2, as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __NVHOST_ACM_H
22#define __NVHOST_ACM_H
23
24#include <linux/workqueue.h>
25#include <linux/wait.h>
26#include <linux/mutex.h>
27#include <linux/clk.h>
28#include <linux/nvhost.h>
29
30/* Sets clocks and powergating state for a module */
31int nvhost_module_init(struct nvhost_device *ndev);
32void nvhost_module_deinit(struct nvhost_device *dev);
33int nvhost_module_suspend(struct nvhost_device *dev, bool system_suspend);
34
35void nvhost_module_reset(struct nvhost_device *dev);
36void nvhost_module_busy(struct nvhost_device *dev);
37void nvhost_module_idle_mult(struct nvhost_device *dev, int refs);
38int nvhost_module_add_client(struct nvhost_device *dev,
39 void *priv);
40void nvhost_module_remove_client(struct nvhost_device *dev,
41 void *priv);
42int nvhost_module_get_rate(struct nvhost_device *dev,
43 unsigned long *rate,
44 int index);
45int nvhost_module_set_rate(struct nvhost_device *dev, void *priv,
46 unsigned long rate, int index);
47
48
49static inline bool nvhost_module_powered(struct nvhost_device *dev)
50{
51 return dev->powerstate == NVHOST_POWER_STATE_RUNNING;
52}
53
54static inline void nvhost_module_idle(struct nvhost_device *dev)
55{
56 nvhost_module_idle_mult(dev, 1);
57}
58
59
60#endif