summaryrefslogtreecommitdiff
path: root/drivers/clk/zynqmp
diff options
context:
space:
mode:
authorRajan Vaja <rajan.vaja@xilinx.com>2020-03-03 00:50:42 +0300
committerStephen Boyd <sboyd@kernel.org>2020-05-27 03:59:06 +0300
commit5268aa1c561f64c5af0daaaee87425ef9ce210d3 (patch)
treee3e4b5ebb6a341be1ab5b2387f7573baab1f2be3 /drivers/clk/zynqmp
parentb8c1049c68d634a412ed5980ae666ed7c8839305 (diff)
downloadlinux-5268aa1c561f64c5af0daaaee87425ef9ce210d3.tar.xz
clk: zynqmp: 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 zynqmp_pm_clock_get_name() in versal_get_clock_info() function. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Signed-off-by: Tejas Patel <tejas.patel@xilinx.com> Signed-off-by: Jolly Shah <jolly.shah@xilinx.com> Link: https://lkml.kernel.org/r/1583185843-20707-4-git-send-email-jolly.shah@xilinx.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/zynqmp')
-rw-r--r--drivers/clk/zynqmp/clkc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
index 10e89f23880b..3e83c51d65a6 100644
--- a/drivers/clk/zynqmp/clkc.c
+++ b/drivers/clk/zynqmp/clkc.c
@@ -663,6 +663,11 @@ static void zynqmp_get_clock_info(void)
continue;
clock[i].valid = FIELD_GET(CLK_ATTR_VALID, attr.attr[0]);
+ /* skip query for Invalid clock */
+ ret = zynqmp_is_valid_clock(i);
+ if (ret != CLK_ATTR_VALID)
+ continue;
+
clock[i].type = FIELD_GET(CLK_ATTR_TYPE, attr.attr[0]) ?
CLK_TYPE_EXTERNAL : CLK_TYPE_OUTPUT;