Skip to content

Commit 0c4b225

Browse files
jbuddhabgregkh
authored andcommitted
firmware: xilinx: Export function to use in other module
Export zynqmp_pm_get_family_info() to access and find family information in other module. Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com> Link: https://lore.kernel.org/r/20231219055025.27570-2-jay.buddhabhatti@amd.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2ad3cc0 commit 0c4b225

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

drivers/firmware/xilinx/zynqmp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_get_chipid);
463463
*
464464
* Return: Returns status, either success or error+reason
465465
*/
466-
static int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily)
466+
int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily)
467467
{
468468
u32 ret_payload[PAYLOAD_ARG_CNT];
469469
u32 idcode;
@@ -488,6 +488,7 @@ static int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily)
488488

489489
return 0;
490490
}
491+
EXPORT_SYMBOL_GPL(zynqmp_pm_get_family_info);
491492

492493
/**
493494
* zynqmp_pm_get_trustzone_version() - Get secure trustzone firmware version

include/linux/firmware/xlnx-zynqmp.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ int zynqmp_pm_invoke_fn(u32 pm_api_id, u32 *ret_payload, u32 num_args, ...);
524524
#if IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE)
525525
int zynqmp_pm_get_api_version(u32 *version);
526526
int zynqmp_pm_get_chipid(u32 *idcode, u32 *version);
527+
int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily);
527528
int zynqmp_pm_query_data(struct zynqmp_pm_query_data qdata, u32 *out);
528529
int zynqmp_pm_clock_enable(u32 clock_id);
529530
int zynqmp_pm_clock_disable(u32 clock_id);
@@ -602,6 +603,11 @@ static inline int zynqmp_pm_get_chipid(u32 *idcode, u32 *version)
602603
return -ENODEV;
603604
}
604605

606+
static inline int zynqmp_pm_get_family_info(u32 *family, u32 *subfamily)
607+
{
608+
return -ENODEV;
609+
}
610+
605611
static inline int zynqmp_pm_query_data(struct zynqmp_pm_query_data qdata,
606612
u32 *out)
607613
{

0 commit comments

Comments
 (0)