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

firmware: xilinx: Remove eemi ops for reset_assert

Use direct function call instead of using eemi ops for
reset_assert.
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-13-git-send-email-jolly.shah@xilinx.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 426c8d85
...@@ -627,12 +627,13 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_sd_dll_reset); ...@@ -627,12 +627,13 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_sd_dll_reset);
* *
* Return: Returns status, either success or error+reason * Return: Returns status, either success or error+reason
*/ */
static int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset, int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset,
const enum zynqmp_pm_reset_action assert_flag) const enum zynqmp_pm_reset_action assert_flag)
{ {
return zynqmp_pm_invoke_fn(PM_RESET_ASSERT, reset, assert_flag, return zynqmp_pm_invoke_fn(PM_RESET_ASSERT, reset, assert_flag,
0, 0, NULL); 0, 0, NULL);
} }
EXPORT_SYMBOL_GPL(zynqmp_pm_reset_assert);
/** /**
* zynqmp_pm_reset_get_status - Get status of the reset * zynqmp_pm_reset_get_status - Get status of the reset
...@@ -807,7 +808,6 @@ static int zynqmp_pm_aes_engine(const u64 address, u32 *out) ...@@ -807,7 +808,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 = {
.reset_assert = zynqmp_pm_reset_assert,
.reset_get_status = zynqmp_pm_reset_get_status, .reset_get_status = zynqmp_pm_reset_get_status,
.init_finalize = zynqmp_pm_init_finalize, .init_finalize = zynqmp_pm_init_finalize,
.set_suspend_mode = zynqmp_pm_set_suspend_mode, .set_suspend_mode = zynqmp_pm_set_suspend_mode,
......
...@@ -27,19 +27,15 @@ to_zynqmp_reset_data(struct reset_controller_dev *rcdev) ...@@ -27,19 +27,15 @@ to_zynqmp_reset_data(struct reset_controller_dev *rcdev)
static int zynqmp_reset_assert(struct reset_controller_dev *rcdev, static int zynqmp_reset_assert(struct reset_controller_dev *rcdev,
unsigned long id) unsigned long id)
{ {
struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev); return zynqmp_pm_reset_assert(ZYNQMP_RESET_ID + id,
PM_RESET_ACTION_ASSERT);
return priv->eemi_ops->reset_assert(ZYNQMP_RESET_ID + id,
PM_RESET_ACTION_ASSERT);
} }
static int zynqmp_reset_deassert(struct reset_controller_dev *rcdev, static int zynqmp_reset_deassert(struct reset_controller_dev *rcdev,
unsigned long id) unsigned long id)
{ {
struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev); return zynqmp_pm_reset_assert(ZYNQMP_RESET_ID + id,
PM_RESET_ACTION_RELEASE);
return priv->eemi_ops->reset_assert(ZYNQMP_RESET_ID + id,
PM_RESET_ACTION_RELEASE);
} }
static int zynqmp_reset_status(struct reset_controller_dev *rcdev, static int zynqmp_reset_status(struct reset_controller_dev *rcdev,
...@@ -58,10 +54,8 @@ static int zynqmp_reset_status(struct reset_controller_dev *rcdev, ...@@ -58,10 +54,8 @@ static int zynqmp_reset_status(struct reset_controller_dev *rcdev,
static int zynqmp_reset_reset(struct reset_controller_dev *rcdev, static int zynqmp_reset_reset(struct reset_controller_dev *rcdev,
unsigned long id) unsigned long id)
{ {
struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev); return zynqmp_pm_reset_assert(ZYNQMP_RESET_ID + id,
PM_RESET_ACTION_PULSE);
return priv->eemi_ops->reset_assert(ZYNQMP_RESET_ID + id,
PM_RESET_ACTION_PULSE);
} }
static const struct reset_control_ops zynqmp_reset_ops = { static const struct reset_control_ops zynqmp_reset_ops = {
......
...@@ -296,8 +296,6 @@ struct zynqmp_pm_query_data { ...@@ -296,8 +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 (*reset_assert)(const enum zynqmp_pm_reset reset,
const enum zynqmp_pm_reset_action assert_flag);
int (*reset_get_status)(const enum zynqmp_pm_reset reset, u32 *status); int (*reset_get_status)(const enum zynqmp_pm_reset reset, u32 *status);
int (*init_finalize)(void); int (*init_finalize)(void);
int (*set_suspend_mode)(u32 mode); int (*set_suspend_mode)(u32 mode);
...@@ -336,6 +334,8 @@ int zynqmp_pm_set_pll_frac_data(u32 clk_id, u32 data); ...@@ -336,6 +334,8 @@ int zynqmp_pm_set_pll_frac_data(u32 clk_id, u32 data);
int zynqmp_pm_get_pll_frac_data(u32 clk_id, u32 *data); int zynqmp_pm_get_pll_frac_data(u32 clk_id, u32 *data);
int zynqmp_pm_set_sd_tapdelay(u32 node_id, u32 type, u32 value); int zynqmp_pm_set_sd_tapdelay(u32 node_id, u32 type, u32 value);
int zynqmp_pm_sd_dll_reset(u32 node_id, u32 type); int zynqmp_pm_sd_dll_reset(u32 node_id, u32 type);
int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset,
const enum zynqmp_pm_reset_action assert_flag);
#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)
{ {
...@@ -414,6 +414,11 @@ static inline int zynqmp_pm_sd_dll_reset(u32 node_id, u32 type) ...@@ -414,6 +414,11 @@ static inline int zynqmp_pm_sd_dll_reset(u32 node_id, u32 type)
{ {
return -ENODEV; return -ENODEV;
} }
static inline int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset,
const enum zynqmp_pm_reset_action assert_flag)
{
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