aboutsummaryrefslogtreecommitdiffstats
path: root/include/soc
diff options
context:
space:
mode:
authorJon Hunter <jonathanh@nvidia.com>2016-02-11 13:03:22 -0500
committerThierry Reding <treding@nvidia.com>2016-04-05 09:22:47 -0400
commit70293ed09decd1ec4ae5632af27cab73c16a50ba (patch)
tree0090dcecc572c84af17138168c491cf9a0714581 /include/soc
parente8cf6616a346029fe3e3931dd34fc589fade4b6e (diff)
soc/tegra: pmc: Change powergate and rail IDs to be an unsigned type
The Tegra powergate and rail IDs are always positive values and so change the type to be unsigned and remove the tests to see if the ID is less than zero. Update the Tegra DC powergate type to be an unsigned as well. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/tegra/pmc.h35
1 files changed, 18 insertions, 17 deletions
diff --git a/include/soc/tegra/pmc.h b/include/soc/tegra/pmc.h
index d18efe402ff1..07e332dd44fb 100644
--- a/include/soc/tegra/pmc.h
+++ b/include/soc/tegra/pmc.h
@@ -33,9 +33,9 @@ void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
33#endif /* CONFIG_PM_SLEEP */ 33#endif /* CONFIG_PM_SLEEP */
34 34
35#ifdef CONFIG_SMP 35#ifdef CONFIG_SMP
36bool tegra_pmc_cpu_is_powered(int cpuid); 36bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
37int tegra_pmc_cpu_power_on(int cpuid); 37int tegra_pmc_cpu_power_on(unsigned int cpuid);
38int tegra_pmc_cpu_remove_clamping(int cpuid); 38int tegra_pmc_cpu_remove_clamping(unsigned int cpuid);
39#endif /* CONFIG_SMP */ 39#endif /* CONFIG_SMP */
40 40
41/* 41/*
@@ -108,50 +108,51 @@ int tegra_pmc_cpu_remove_clamping(int cpuid);
108#define TEGRA_IO_RAIL_SYS_DDC 58 108#define TEGRA_IO_RAIL_SYS_DDC 58
109 109
110#ifdef CONFIG_ARCH_TEGRA 110#ifdef CONFIG_ARCH_TEGRA
111int tegra_powergate_is_powered(int id); 111int tegra_powergate_is_powered(unsigned int id);
112int tegra_powergate_power_on(int id); 112int tegra_powergate_power_on(unsigned int id);
113int tegra_powergate_power_off(int id); 113int tegra_powergate_power_off(unsigned int id);
114int tegra_powergate_remove_clamping(int id); 114int tegra_powergate_remove_clamping(unsigned int id);
115 115
116/* Must be called with clk disabled, and returns with clk enabled */ 116/* Must be called with clk disabled, and returns with clk enabled */
117int tegra_powergate_sequence_power_up(int id, struct clk *clk, 117int tegra_powergate_sequence_power_up(unsigned int id, struct clk *clk,
118 struct reset_control *rst); 118 struct reset_control *rst);
119 119
120int tegra_io_rail_power_on(int id); 120int tegra_io_rail_power_on(unsigned int id);
121int tegra_io_rail_power_off(int id); 121int tegra_io_rail_power_off(unsigned int id);
122#else 122#else
123static inline int tegra_powergate_is_powered(int id) 123static inline int tegra_powergate_is_powered(unsigned int id)
124{ 124{
125 return -ENOSYS; 125 return -ENOSYS;
126} 126}
127 127
128static inline int tegra_powergate_power_on(int id) 128static inline int tegra_powergate_power_on(unsigned int id)
129{ 129{
130 return -ENOSYS; 130 return -ENOSYS;
131} 131}
132 132
133static inline int tegra_powergate_power_off(int id) 133static inline int tegra_powergate_power_off(unsigned int id)
134{ 134{
135 return -ENOSYS; 135 return -ENOSYS;
136} 136}
137 137
138static inline int tegra_powergate_remove_clamping(int id) 138static inline int tegra_powergate_remove_clamping(unsigned int id)
139{ 139{
140 return -ENOSYS; 140 return -ENOSYS;
141} 141}
142 142
143static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk, 143static inline int tegra_powergate_sequence_power_up(unsigned int id,
144 struct clk *clk,
144 struct reset_control *rst) 145 struct reset_control *rst)
145{ 146{
146 return -ENOSYS; 147 return -ENOSYS;
147} 148}
148 149
149static inline int tegra_io_rail_power_on(int id) 150static inline int tegra_io_rail_power_on(unsigned int id)
150{ 151{
151 return -ENOSYS; 152 return -ENOSYS;
152} 153}
153 154
154static inline int tegra_io_rail_power_off(int id) 155static inline int tegra_io_rail_power_off(unsigned int id)
155{ 156{
156 return -ENOSYS; 157 return -ENOSYS;
157} 158}