summaryrefslogtreecommitdiff
path: root/drivers/clk/clk_versal.c
diff options
context:
space:
mode:
authorRajan Vaja <rajan.vaja@xilinx.com>2020-01-16 03:55:05 -0800
committerMichal Simek <michal.simek@xilinx.com>2020-02-28 12:04:10 +0100
commit65bcca9f52af8ff88d46de317a9ca6e8a2da5d69 (patch)
treed91f05f04a046e9fcb1b9f348cab2d6093ef734d /drivers/clk/clk_versal.c
parent1bf9e01b8f82c442029607ab953c6a0d099c7d68 (diff)
versal: drivers: clk: Fix invalid clock name queries
The clock driver makes EEMI call to get the name of invalid clk when executing versal_get_clock_info() function. This results in error messages. Added check for validating clock before saving clock attribute and calling versal_pm_clock_get_name() in versal_get_clock_info() function. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/clk/clk_versal.c')
-rw-r--r--drivers/clk/clk_versal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 9d4d2149e3..d3673a5c8b 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -571,6 +571,12 @@ static void versal_get_clock_info(void)
continue;
clock[i].valid = attr & CLK_VALID_MASK;
+
+ /* skip query for Invalid clock */
+ ret = versal_is_valid_clock(i);
+ if (ret != CLK_VALID_MASK)
+ continue;
+
clock[i].type = ((attr >> CLK_TYPE_SHIFT) & 0x1) ?
CLK_TYPE_EXTERNAL : CLK_TYPE_OUTPUT;
nodetype = (attr >> NODE_TYPE_SHIFT) & NODE_CLASS_MASK;