File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,9 +77,8 @@ static int zynqmp_clk_gate_is_enabled(struct clk_hw *hw)
7777 const char * clk_name = clk_hw_get_name (hw );
7878 u32 clk_id = gate -> clk_id ;
7979 int state , ret ;
80- const struct zynqmp_eemi_ops * eemi_ops = zynqmp_pm_get_eemi_ops ();
8180
82- ret = eemi_ops -> clock_getstate (clk_id , & state );
81+ ret = zynqmp_pm_clock_getstate (clk_id , & state );
8382 if (ret ) {
8483 pr_warn_once ("%s() clock get state failed for %s, ret = %d\n" ,
8584 __func__ , clk_name , ret );
Original file line number Diff line number Diff line change @@ -222,9 +222,8 @@ static int zynqmp_pll_is_enabled(struct clk_hw *hw)
222222 u32 clk_id = clk -> clk_id ;
223223 unsigned int state ;
224224 int ret ;
225- const struct zynqmp_eemi_ops * eemi_ops = zynqmp_pm_get_eemi_ops ();
226225
227- ret = eemi_ops -> clock_getstate (clk_id , & state );
226+ ret = zynqmp_pm_clock_getstate (clk_id , & state );
228227 if (ret ) {
229228 pr_warn_once ("%s() clock get state failed for %s, ret = %d\n" ,
230229 __func__ , clk_name , ret );
Original file line number Diff line number Diff line change @@ -382,7 +382,7 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_clock_disable);
382382 *
383383 * Return: Returns status, either success or error+reason
384384 */
385- static int zynqmp_pm_clock_getstate (u32 clock_id , u32 * state )
385+ int zynqmp_pm_clock_getstate (u32 clock_id , u32 * state )
386386{
387387 u32 ret_payload [PAYLOAD_ARG_CNT ];
388388 int ret ;
@@ -393,6 +393,7 @@ static int zynqmp_pm_clock_getstate(u32 clock_id, u32 *state)
393393
394394 return ret ;
395395}
396+ EXPORT_SYMBOL_GPL (zynqmp_pm_clock_getstate );
396397
397398/**
398399 * zynqmp_pm_clock_setdivider() - Set the clock divider for given id
@@ -739,7 +740,6 @@ static int zynqmp_pm_aes_engine(const u64 address, u32 *out)
739740}
740741
741742static const struct zynqmp_eemi_ops eemi_ops = {
742- .clock_getstate = zynqmp_pm_clock_getstate ,
743743 .clock_setdivider = zynqmp_pm_clock_setdivider ,
744744 .clock_getdivider = zynqmp_pm_clock_getdivider ,
745745 .clock_setrate = zynqmp_pm_clock_setrate ,
Original file line number Diff line number Diff line change @@ -296,7 +296,6 @@ struct zynqmp_pm_query_data {
296296struct zynqmp_eemi_ops {
297297 int (* fpga_load )(const u64 address , const u32 size , const u32 flags );
298298 int (* fpga_get_status )(u32 * value );
299- int (* clock_getstate )(u32 clock_id , u32 * state );
300299 int (* clock_setdivider )(u32 clock_id , u32 divider );
301300 int (* clock_getdivider )(u32 clock_id , u32 * divider );
302301 int (* clock_setrate )(u32 clock_id , u64 rate );
@@ -331,6 +330,7 @@ int zynqmp_pm_get_chipid(u32 *idcode, u32 *version);
331330int zynqmp_pm_query_data (struct zynqmp_pm_query_data qdata , u32 * out );
332331int zynqmp_pm_clock_enable (u32 clock_id );
333332int zynqmp_pm_clock_disable (u32 clock_id );
333+ int zynqmp_pm_clock_getstate (u32 clock_id , u32 * state );
334334#else
335335static inline struct zynqmp_eemi_ops * zynqmp_pm_get_eemi_ops (void )
336336{
@@ -357,6 +357,10 @@ static inline int zynqmp_pm_clock_disable(u32 clock_id)
357357{
358358 return - ENODEV ;
359359}
360+ static inline int zynqmp_pm_clock_getstate (u32 clock_id , u32 * state )
361+ {
362+ return - ENODEV ;
363+ }
360364#endif
361365
362366#endif /* __FIRMWARE_ZYNQMP_H__ */
You can’t perform that action at this time.
0 commit comments