Skip to content

Commit f33d609

Browse files
ronakj89michalsimek
authored andcommitted
firmware: xilinx: use u32 for reset ID in reset APIs
Refactors the reset handling mechanisms by replacing the reset ID's enum type with a u32. This update improves flexibility, allowing the reset ID to accommodate a broader range of values, including those that may not fit into predefined enum values. The use of u32 for reset ID enhances extensibility, especially for hardware platforms or features where more granular control of reset operations is required. By shifting to a general integer type, this change reduces constraints and simplifies integration with other system components that rely on non-enum-based reset IDs. Signed-off-by: Ronak Jain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
1 parent 848f2bb commit f33d609

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

drivers/firmware/xilinx/zynqmp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ int zynqmp_pm_set_boot_health_status(u32 value)
920920
*
921921
* Return: Returns status, either success or error+reason
922922
*/
923-
int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset,
923+
int zynqmp_pm_reset_assert(const u32 reset,
924924
const enum zynqmp_pm_reset_action assert_flag)
925925
{
926926
return zynqmp_pm_invoke_fn(PM_RESET_ASSERT, NULL, 2, reset, assert_flag);
@@ -934,7 +934,7 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_reset_assert);
934934
*
935935
* Return: Returns status, either success or error+reason
936936
*/
937-
int zynqmp_pm_reset_get_status(const enum zynqmp_pm_reset reset, u32 *status)
937+
int zynqmp_pm_reset_get_status(const u32 reset, u32 *status)
938938
{
939939
u32 ret_payload[PAYLOAD_ARG_CNT];
940940
int ret;

include/linux/firmware/xlnx-zynqmp.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,9 @@ int zynqmp_pm_get_pll_frac_data(u32 clk_id, u32 *data);
557557
int zynqmp_pm_set_sd_tapdelay(u32 node_id, u32 type, u32 value);
558558
int zynqmp_pm_sd_dll_reset(u32 node_id, u32 type);
559559
int zynqmp_pm_ospi_mux_select(u32 dev_id, u32 select);
560-
int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset,
560+
int zynqmp_pm_reset_assert(const u32 reset,
561561
const enum zynqmp_pm_reset_action assert_flag);
562-
int zynqmp_pm_reset_get_status(const enum zynqmp_pm_reset reset, u32 *status);
562+
int zynqmp_pm_reset_get_status(const u32 reset, u32 *status);
563563
unsigned int zynqmp_pm_bootmode_read(u32 *ps_mode);
564564
int zynqmp_pm_bootmode_write(u32 ps_mode);
565565
int zynqmp_pm_init_finalize(void);
@@ -702,14 +702,13 @@ static inline int zynqmp_pm_ospi_mux_select(u32 dev_id, u32 select)
702702
return -ENODEV;
703703
}
704704

705-
static inline int zynqmp_pm_reset_assert(const enum zynqmp_pm_reset reset,
705+
static inline int zynqmp_pm_reset_assert(const u32 reset,
706706
const enum zynqmp_pm_reset_action assert_flag)
707707
{
708708
return -ENODEV;
709709
}
710710

711-
static inline int zynqmp_pm_reset_get_status(const enum zynqmp_pm_reset reset,
712-
u32 *status)
711+
static inline int zynqmp_pm_reset_get_status(const u32 reset, u32 *status)
713712
{
714713
return -ENODEV;
715714
}

0 commit comments

Comments
 (0)