@@ -123,38 +123,17 @@ static inline void tegra_cpu_clock_resume(void)
123
123
}
124
124
#endif
125
125
126
- extern int tegra210_plle_hw_sequence_start (void );
127
- extern bool tegra210_plle_hw_sequence_is_enabled (void );
128
- extern void tegra210_xusb_pll_hw_control_enable (void );
129
- extern void tegra210_xusb_pll_hw_sequence_start (void );
130
- extern void tegra210_sata_pll_hw_control_enable (void );
131
- extern void tegra210_sata_pll_hw_sequence_start (void );
132
- extern void tegra210_set_sata_pll_seq_sw (bool state );
133
- extern void tegra210_put_utmipll_in_iddq (void );
134
- extern void tegra210_put_utmipll_out_iddq (void );
135
- extern int tegra210_clk_handle_mbist_war (unsigned int id );
136
- extern void tegra210_clk_emc_dll_enable (bool flag );
137
- extern void tegra210_clk_emc_dll_update_setting (u32 emc_dll_src_value );
138
- extern void tegra210_clk_emc_update_setting (u32 emc_src_value );
139
-
140
126
struct clk ;
141
127
struct tegra_emc ;
142
128
143
129
typedef long (tegra20_clk_emc_round_cb )(unsigned long rate ,
144
130
unsigned long min_rate ,
145
131
unsigned long max_rate ,
146
132
void * arg );
147
-
148
- void tegra20_clk_set_emc_round_callback (tegra20_clk_emc_round_cb * round_cb ,
149
- void * cb_arg );
150
- int tegra20_clk_prepare_emc_mc_same_freq (struct clk * emc_clk , bool same );
151
-
152
133
typedef int (tegra124_emc_prepare_timing_change_cb )(struct tegra_emc * emc ,
153
134
unsigned long rate );
154
135
typedef void (tegra124_emc_complete_timing_change_cb )(struct tegra_emc * emc ,
155
136
unsigned long rate );
156
- void tegra124_clk_set_emc_callbacks (tegra124_emc_prepare_timing_change_cb * prep_cb ,
157
- tegra124_emc_complete_timing_change_cb * complete_cb );
158
137
159
138
struct tegra210_clk_emc_config {
160
139
unsigned long rate ;
@@ -176,8 +155,87 @@ struct tegra210_clk_emc_provider {
176
155
const struct tegra210_clk_emc_config * config );
177
156
};
178
157
158
+ #if defined(CONFIG_ARCH_TEGRA_2x_SOC ) || defined(CONFIG_ARCH_TEGRA_3x_SOC )
159
+ void tegra20_clk_set_emc_round_callback (tegra20_clk_emc_round_cb * round_cb ,
160
+ void * cb_arg );
161
+ int tegra20_clk_prepare_emc_mc_same_freq (struct clk * emc_clk , bool same );
162
+ #else
163
+ static inline void
164
+ tegra20_clk_set_emc_round_callback (tegra20_clk_emc_round_cb * round_cb ,
165
+ void * cb_arg )
166
+ {
167
+ }
168
+
169
+ static inline int
170
+ tegra20_clk_prepare_emc_mc_same_freq (struct clk * emc_clk , bool same )
171
+ {
172
+ return 0 ;
173
+ }
174
+ #endif
175
+
176
+ #ifdef CONFIG_TEGRA124_CLK_EMC
177
+ void tegra124_clk_set_emc_callbacks (tegra124_emc_prepare_timing_change_cb * prep_cb ,
178
+ tegra124_emc_complete_timing_change_cb * complete_cb );
179
+ #else
180
+ static inline void
181
+ tegra124_clk_set_emc_callbacks (tegra124_emc_prepare_timing_change_cb * prep_cb ,
182
+ tegra124_emc_complete_timing_change_cb * complete_cb )
183
+ {
184
+ }
185
+ #endif
186
+
187
+ #ifdef CONFIG_ARCH_TEGRA_210_SOC
188
+ int tegra210_plle_hw_sequence_start (void );
189
+ bool tegra210_plle_hw_sequence_is_enabled (void );
190
+ void tegra210_xusb_pll_hw_control_enable (void );
191
+ void tegra210_xusb_pll_hw_sequence_start (void );
192
+ void tegra210_sata_pll_hw_control_enable (void );
193
+ void tegra210_sata_pll_hw_sequence_start (void );
194
+ void tegra210_set_sata_pll_seq_sw (bool state );
195
+ void tegra210_put_utmipll_in_iddq (void );
196
+ void tegra210_put_utmipll_out_iddq (void );
197
+ int tegra210_clk_handle_mbist_war (unsigned int id );
198
+ void tegra210_clk_emc_dll_enable (bool flag );
199
+ void tegra210_clk_emc_dll_update_setting (u32 emc_dll_src_value );
200
+ void tegra210_clk_emc_update_setting (u32 emc_src_value );
201
+
179
202
int tegra210_clk_emc_attach (struct clk * clk ,
180
203
struct tegra210_clk_emc_provider * provider );
181
204
void tegra210_clk_emc_detach (struct clk * clk );
205
+ #else
206
+ static inline int tegra210_plle_hw_sequence_start (void )
207
+ {
208
+ return 0 ;
209
+ }
210
+
211
+ static inline bool tegra210_plle_hw_sequence_is_enabled (void )
212
+ {
213
+ return false;
214
+ }
215
+
216
+ static inline int tegra210_clk_handle_mbist_war (unsigned int id )
217
+ {
218
+ return 0 ;
219
+ }
220
+
221
+ static inline int
222
+ tegra210_clk_emc_attach (struct clk * clk ,
223
+ struct tegra210_clk_emc_provider * provider )
224
+ {
225
+ return 0 ;
226
+ }
227
+
228
+ static inline void tegra210_xusb_pll_hw_control_enable (void ) {}
229
+ static inline void tegra210_xusb_pll_hw_sequence_start (void ) {}
230
+ static inline void tegra210_sata_pll_hw_control_enable (void ) {}
231
+ static inline void tegra210_sata_pll_hw_sequence_start (void ) {}
232
+ static inline void tegra210_set_sata_pll_seq_sw (bool state ) {}
233
+ static inline void tegra210_put_utmipll_in_iddq (void ) {}
234
+ static inline void tegra210_put_utmipll_out_iddq (void ) {}
235
+ static inline void tegra210_clk_emc_dll_enable (bool flag ) {}
236
+ static inline void tegra210_clk_emc_dll_update_setting (u32 emc_dll_src_value ) {}
237
+ static inline void tegra210_clk_emc_update_setting (u32 emc_src_value ) {}
238
+ static inline void tegra210_clk_emc_detach (struct clk * clk ) {}
239
+ #endif
182
240
183
241
#endif /* __LINUX_CLK_TEGRA_H_ */
0 commit comments