diff options
Diffstat (limited to 'include/linux/tegra-powergate.h')
-rw-r--r-- | include/linux/tegra-powergate.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/include/linux/tegra-powergate.h b/include/linux/tegra-powergate.h index c98cfa406952..afe442d2629a 100644 --- a/include/linux/tegra-powergate.h +++ b/include/linux/tegra-powergate.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define _MACH_TEGRA_POWERGATE_H_ | 19 | #define _MACH_TEGRA_POWERGATE_H_ |
20 | 20 | ||
21 | struct clk; | 21 | struct clk; |
22 | struct reset_control; | ||
22 | 23 | ||
23 | #define TEGRA_POWERGATE_CPU 0 | 24 | #define TEGRA_POWERGATE_CPU 0 |
24 | #define TEGRA_POWERGATE_3D 1 | 25 | #define TEGRA_POWERGATE_3D 1 |
@@ -45,12 +46,41 @@ struct clk; | |||
45 | 46 | ||
46 | #define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D | 47 | #define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D |
47 | 48 | ||
49 | #ifdef CONFIG_ARCH_TEGRA | ||
48 | int tegra_powergate_is_powered(int id); | 50 | int tegra_powergate_is_powered(int id); |
49 | int tegra_powergate_power_on(int id); | 51 | int tegra_powergate_power_on(int id); |
50 | int tegra_powergate_power_off(int id); | 52 | int tegra_powergate_power_off(int id); |
51 | int tegra_powergate_remove_clamping(int id); | 53 | int tegra_powergate_remove_clamping(int id); |
52 | 54 | ||
53 | /* Must be called with clk disabled, and returns with clk enabled */ | 55 | /* Must be called with clk disabled, and returns with clk enabled */ |
54 | int tegra_powergate_sequence_power_up(int id, struct clk *clk); | 56 | int tegra_powergate_sequence_power_up(int id, struct clk *clk, |
57 | struct reset_control *rst); | ||
58 | #else | ||
59 | static inline int tegra_powergate_is_powered(int id) | ||
60 | { | ||
61 | return -ENOSYS; | ||
62 | } | ||
63 | |||
64 | static inline int tegra_powergate_power_on(int id) | ||
65 | { | ||
66 | return -ENOSYS; | ||
67 | } | ||
68 | |||
69 | static inline int tegra_powergate_power_off(int id) | ||
70 | { | ||
71 | return -ENOSYS; | ||
72 | } | ||
73 | |||
74 | static inline int tegra_powergate_remove_clamping(int id) | ||
75 | { | ||
76 | return -ENOSYS; | ||
77 | } | ||
78 | |||
79 | static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk, | ||
80 | struct reset_control *rst); | ||
81 | { | ||
82 | return -ENOSYS; | ||
83 | } | ||
84 | #endif | ||
55 | 85 | ||
56 | #endif /* _MACH_TEGRA_POWERGATE_H_ */ | 86 | #endif /* _MACH_TEGRA_POWERGATE_H_ */ |