Commit f5ccd54b authored by Rajan Vaja's avatar Rajan Vaja Committed by Greg Kroah-Hartman

firmware: xilinx: Remove eemi ops for clock_disable

Use direct function call for clock_disable instead using of eemi ops.
Signed-off-by: default avatarRajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: default avatarJolly Shah <jolly.shah@xilinx.com>
Link: https://lore.kernel.org/r/1587761887-4279-6-git-send-email-jolly.shah@xilinx.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3637e84c
...@@ -37,7 +37,6 @@ static int zynqmp_clk_gate_enable(struct clk_hw *hw) ...@@ -37,7 +37,6 @@ static int zynqmp_clk_gate_enable(struct clk_hw *hw)
const char *clk_name = clk_hw_get_name(hw); const char *clk_name = clk_hw_get_name(hw);
u32 clk_id = gate->clk_id; u32 clk_id = gate->clk_id;
int ret; int ret;
const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops();
ret = zynqmp_pm_clock_enable(clk_id); ret = zynqmp_pm_clock_enable(clk_id);
...@@ -58,9 +57,8 @@ static void zynqmp_clk_gate_disable(struct clk_hw *hw) ...@@ -58,9 +57,8 @@ static void zynqmp_clk_gate_disable(struct clk_hw *hw)
const char *clk_name = clk_hw_get_name(hw); const char *clk_name = clk_hw_get_name(hw);
u32 clk_id = gate->clk_id; u32 clk_id = gate->clk_id;
int ret; int ret;
const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops();
ret = eemi_ops->clock_disable(clk_id); ret = zynqmp_pm_clock_disable(clk_id);
if (ret) if (ret)
pr_warn_once("%s() clock disable failed for %s, ret = %d\n", pr_warn_once("%s() clock disable failed for %s, ret = %d\n",
......
...@@ -268,12 +268,11 @@ static void zynqmp_pll_disable(struct clk_hw *hw) ...@@ -268,12 +268,11 @@ static void zynqmp_pll_disable(struct clk_hw *hw)
const char *clk_name = clk_hw_get_name(hw); const char *clk_name = clk_hw_get_name(hw);
u32 clk_id = clk->clk_id; u32 clk_id = clk->clk_id;
int ret; int ret;
const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops();
if (!zynqmp_pll_is_enabled(hw)) if (!zynqmp_pll_is_enabled(hw))
return; return;
ret = eemi_ops->clock_disable(clk_id); ret = zynqmp_pm_clock_disable(clk_id);
if (ret) if (ret)
pr_warn_once("%s() clock disable failed for %s, ret = %d\n", pr_warn_once("%s() clock disable failed for %s, ret = %d\n",
__func__, clk_name, ret); __func__, clk_name, ret);
......
...@@ -366,10 +366,11 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_clock_enable); ...@@ -366,10 +366,11 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_clock_enable);
* *
* Return: Returns status, either success or error+reason * Return: Returns status, either success or error+reason
*/ */
static int zynqmp_pm_clock_disable(u32 clock_id) int zynqmp_pm_clock_disable(u32 clock_id)
{ {
return zynqmp_pm_invoke_fn(PM_CLOCK_DISABLE, clock_id, 0, 0, 0, NULL); return zynqmp_pm_invoke_fn(PM_CLOCK_DISABLE, clock_id, 0, 0, 0, NULL);
} }
EXPORT_SYMBOL_GPL(zynqmp_pm_clock_disable);
/** /**
* zynqmp_pm_clock_getstate() - Get the clock state for given id * zynqmp_pm_clock_getstate() - Get the clock state for given id
...@@ -738,7 +739,6 @@ static int zynqmp_pm_aes_engine(const u64 address, u32 *out) ...@@ -738,7 +739,6 @@ static int zynqmp_pm_aes_engine(const u64 address, u32 *out)
} }
static const struct zynqmp_eemi_ops eemi_ops = { static const struct zynqmp_eemi_ops eemi_ops = {
.clock_disable = zynqmp_pm_clock_disable,
.clock_getstate = zynqmp_pm_clock_getstate, .clock_getstate = zynqmp_pm_clock_getstate,
.clock_setdivider = zynqmp_pm_clock_setdivider, .clock_setdivider = zynqmp_pm_clock_setdivider,
.clock_getdivider = zynqmp_pm_clock_getdivider, .clock_getdivider = zynqmp_pm_clock_getdivider,
......
...@@ -296,7 +296,6 @@ struct zynqmp_pm_query_data { ...@@ -296,7 +296,6 @@ struct zynqmp_pm_query_data {
struct zynqmp_eemi_ops { struct zynqmp_eemi_ops {
int (*fpga_load)(const u64 address, const u32 size, const u32 flags); int (*fpga_load)(const u64 address, const u32 size, const u32 flags);
int (*fpga_get_status)(u32 *value); int (*fpga_get_status)(u32 *value);
int (*clock_disable)(u32 clock_id);
int (*clock_getstate)(u32 clock_id, u32 *state); int (*clock_getstate)(u32 clock_id, u32 *state);
int (*clock_setdivider)(u32 clock_id, u32 divider); int (*clock_setdivider)(u32 clock_id, u32 divider);
int (*clock_getdivider)(u32 clock_id, u32 *divider); int (*clock_getdivider)(u32 clock_id, u32 *divider);
...@@ -331,6 +330,7 @@ int zynqmp_pm_get_api_version(u32 *version); ...@@ -331,6 +330,7 @@ int zynqmp_pm_get_api_version(u32 *version);
int zynqmp_pm_get_chipid(u32 *idcode, u32 *version); int zynqmp_pm_get_chipid(u32 *idcode, u32 *version);
int zynqmp_pm_query_data(struct zynqmp_pm_query_data qdata, u32 *out); int zynqmp_pm_query_data(struct zynqmp_pm_query_data qdata, u32 *out);
int zynqmp_pm_clock_enable(u32 clock_id); int zynqmp_pm_clock_enable(u32 clock_id);
int zynqmp_pm_clock_disable(u32 clock_id);
#else #else
static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void) static inline struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void)
{ {
...@@ -353,6 +353,10 @@ static inline int zynqmp_pm_clock_enable(u32 clock_id) ...@@ -353,6 +353,10 @@ static inline int zynqmp_pm_clock_enable(u32 clock_id)
{ {
return -ENODEV; return -ENODEV;
} }
static inline int zynqmp_pm_clock_disable(u32 clock_id)
{
return -ENODEV;
}
#endif #endif
#endif /* __FIRMWARE_ZYNQMP_H__ */ #endif /* __FIRMWARE_ZYNQMP_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment