@@ -123,38 +123,17 @@ static inline void tegra_cpu_clock_resume(void)
123123}
124124#endif
125125
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-
140126struct clk ;
141127struct tegra_emc ;
142128
143129typedef long (tegra20_clk_emc_round_cb )(unsigned long rate ,
144130 unsigned long min_rate ,
145131 unsigned long max_rate ,
146132 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-
152133typedef int (tegra124_emc_prepare_timing_change_cb )(struct tegra_emc * emc ,
153134 unsigned long rate );
154135typedef void (tegra124_emc_complete_timing_change_cb )(struct tegra_emc * emc ,
155136 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 );
158137
159138struct tegra210_clk_emc_config {
160139 unsigned long rate ;
@@ -176,8 +155,87 @@ struct tegra210_clk_emc_provider {
176155 const struct tegra210_clk_emc_config * config );
177156};
178157
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+
179202int tegra210_clk_emc_attach (struct clk * clk ,
180203 struct tegra210_clk_emc_provider * provider );
181204void 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
182240
183241#endif /* __LINUX_CLK_TEGRA_H_ */
0 commit comments