ARM: tegra: usb_phy: Correct utmi power off sequence
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-tegra / dvfs.h
1 /*
2  *
3  * Copyright (C) 2010 Google, Inc.
4  *
5  * Author:
6  *      Colin Cross <ccross@google.com>
7  *
8  * This software is licensed under the terms of the GNU General Public
9  * License version 2, as published by the Free Software Foundation, and
10  * may be copied, distributed, and modified under those terms.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  */
18
19 #ifndef _TEGRA_DVFS_H_
20 #define _TEGRA_DVFS_H_
21
22 #define MAX_DVFS_FREQS  16
23
24 struct clk;
25
26 struct dvfs {
27         /* Used only by tegra2_clock.c */
28         const char *clk_name;
29         int process_id;
30         bool cpu;
31
32         /* Must be initialized before tegra_dvfs_init */
33         const char *reg_id;
34         int freqs_mult;
35         unsigned long freqs[MAX_DVFS_FREQS];
36         unsigned long millivolts[MAX_DVFS_FREQS];
37         bool auto_dvfs;
38         bool higher;
39
40         /* Filled in by tegra_dvfs_init */
41         int max_millivolts;
42         int num_freqs;
43         struct dvfs_reg *dvfs_reg;
44
45         int cur_millivolts;
46         unsigned long cur_rate;
47         struct list_head node;
48         struct list_head debug_node;
49         struct list_head reg_node;
50 };
51
52 void tegra2_init_dvfs(void);
53 int tegra_enable_dvfs_on_clk(struct clk *c, struct dvfs *d);
54 int dvfs_debugfs_init(struct dentry *clk_debugfs_root);
55 int tegra_dvfs_late_init(void);
56
57 #endif