mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 07:31:29 +00:00
firmware: xilinx: Remove eemi ops for get_api_version
Use direct function calls instead of using eemi ops. So remove eemi ops for get_api_version and use direct function call. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Signed-off-by: Jolly Shah <jolly.shah@xilinx.com> Link: https://lore.kernel.org/r/1587761887-4279-2-git-send-email-jolly.shah@xilinx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7536ad8dbf
commit
b9b3a8be28
@ -92,7 +92,7 @@ static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret)
|
|||||||
|
|
||||||
switch (pm_id) {
|
switch (pm_id) {
|
||||||
case PM_GET_API_VERSION:
|
case PM_GET_API_VERSION:
|
||||||
ret = eemi_ops->get_api_version(&pm_api_version);
|
ret = zynqmp_pm_get_api_version(&pm_api_version);
|
||||||
sprintf(debugfs_buf, "PM-API Version = %d.%d\n",
|
sprintf(debugfs_buf, "PM-API Version = %d.%d\n",
|
||||||
pm_api_version >> 16, pm_api_version & 0xffff);
|
pm_api_version >> 16, pm_api_version & 0xffff);
|
||||||
break;
|
break;
|
||||||
|
@ -219,7 +219,7 @@ static u32 pm_tz_version;
|
|||||||
*
|
*
|
||||||
* Return: Returns status, either success or error+reason
|
* Return: Returns status, either success or error+reason
|
||||||
*/
|
*/
|
||||||
static int zynqmp_pm_get_api_version(u32 *version)
|
int zynqmp_pm_get_api_version(u32 *version)
|
||||||
{
|
{
|
||||||
u32 ret_payload[PAYLOAD_ARG_CNT];
|
u32 ret_payload[PAYLOAD_ARG_CNT];
|
||||||
int ret;
|
int ret;
|
||||||
@ -237,6 +237,7 @@ static int zynqmp_pm_get_api_version(u32 *version)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(zynqmp_pm_get_api_version);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* zynqmp_pm_get_chipid - Get silicon ID registers
|
* zynqmp_pm_get_chipid - Get silicon ID registers
|
||||||
@ -734,7 +735,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 = {
|
||||||
.get_api_version = zynqmp_pm_get_api_version,
|
|
||||||
.get_chipid = zynqmp_pm_get_chipid,
|
.get_chipid = zynqmp_pm_get_chipid,
|
||||||
.query_data = zynqmp_pm_query_data,
|
.query_data = zynqmp_pm_query_data,
|
||||||
.clock_enable = zynqmp_pm_clock_enable,
|
.clock_enable = zynqmp_pm_clock_enable,
|
||||||
|
@ -186,11 +186,11 @@ static int zynqmp_pm_probe(struct platform_device *pdev)
|
|||||||
if (IS_ERR(eemi_ops))
|
if (IS_ERR(eemi_ops))
|
||||||
return PTR_ERR(eemi_ops);
|
return PTR_ERR(eemi_ops);
|
||||||
|
|
||||||
if (!eemi_ops->get_api_version || !eemi_ops->init_finalize)
|
if (!eemi_ops->init_finalize)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
eemi_ops->init_finalize();
|
eemi_ops->init_finalize();
|
||||||
eemi_ops->get_api_version(&pm_api_version);
|
zynqmp_pm_get_api_version(&pm_api_version);
|
||||||
|
|
||||||
/* Check PM API version number */
|
/* Check PM API version number */
|
||||||
if (pm_api_version < ZYNQMP_PM_VERSION)
|
if (pm_api_version < ZYNQMP_PM_VERSION)
|
||||||
|
@ -294,7 +294,6 @@ struct zynqmp_pm_query_data {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct zynqmp_eemi_ops {
|
struct zynqmp_eemi_ops {
|
||||||
int (*get_api_version)(u32 *version);
|
|
||||||
int (*get_chipid)(u32 *idcode, u32 *version);
|
int (*get_chipid)(u32 *idcode, u32 *version);
|
||||||
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);
|
||||||
@ -331,11 +330,16 @@ int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 arg0, u32 arg1,
|
|||||||
|
|
||||||
#if IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
|
#if IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
|
||||||
const struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void);
|
const struct zynqmp_eemi_ops *zynqmp_pm_get_eemi_ops(void);
|
||||||
|
int zynqmp_pm_get_api_version(u32 *version);
|
||||||
#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)
|
||||||
{
|
{
|
||||||
return ERR_PTR(-ENODEV);
|
return ERR_PTR(-ENODEV);
|
||||||
}
|
}
|
||||||
|
static inline int zynqmp_pm_get_api_version(u32 *version)
|
||||||
|
{
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __FIRMWARE_ZYNQMP_H__ */
|
#endif /* __FIRMWARE_ZYNQMP_H__ */
|
||||||
|
Loading…
Reference in New Issue
Block a user