diff options
Diffstat (limited to 'drivers/video/tegra/host/nvhost_acm.h')
-rw-r--r-- | drivers/video/tegra/host/nvhost_acm.h | 60 |
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 */ | ||
31 | int nvhost_module_init(struct nvhost_device *ndev); | ||
32 | void nvhost_module_deinit(struct nvhost_device *dev); | ||
33 | int nvhost_module_suspend(struct nvhost_device *dev, bool system_suspend); | ||
34 | |||
35 | void nvhost_module_reset(struct nvhost_device *dev); | ||
36 | void nvhost_module_busy(struct nvhost_device *dev); | ||
37 | void nvhost_module_idle_mult(struct nvhost_device *dev, int refs); | ||
38 | int nvhost_module_add_client(struct nvhost_device *dev, | ||
39 | void *priv); | ||
40 | void nvhost_module_remove_client(struct nvhost_device *dev, | ||
41 | void *priv); | ||
42 | int nvhost_module_get_rate(struct nvhost_device *dev, | ||
43 | unsigned long *rate, | ||
44 | int index); | ||
45 | int nvhost_module_set_rate(struct nvhost_device *dev, void *priv, | ||
46 | unsigned long rate, int index); | ||
47 | |||
48 | |||
49 | static inline bool nvhost_module_powered(struct nvhost_device *dev) | ||
50 | { | ||
51 | return dev->powerstate == NVHOST_POWER_STATE_RUNNING; | ||
52 | } | ||
53 | |||
54 | static inline void nvhost_module_idle(struct nvhost_device *dev) | ||
55 | { | ||
56 | nvhost_module_idle_mult(dev, 1); | ||
57 | } | ||
58 | |||
59 | |||
60 | #endif | ||