From: Jolly Shah <jolly.shah@xilinx.com>
To: olof@lixom.net, mturquette@baylibre.com, sboyd@kernel.org,
michal.simek@xilinx.com, arm@kernel.org,
linux-clk@vger.kernel.org
Cc: Tejas Patel <tejas.patel@xilinx.com>,
Rajan Vaja <rajan.vaja@xilinx.com>,
linux-kernel@vger.kernel.org, rajanv@xilinx.com,
Jolly Shah <jolly.shah@xilinx.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/4] drivers: clk: zynqmp: Fix invalid clock name queries
Date: Mon, 2 Mar 2020 13:50:42 -0800 [thread overview]
Message-ID: <1583185843-20707-4-git-send-email-jolly.shah@xilinx.com> (raw)
In-Reply-To: <1583185843-20707-1-git-send-email-jolly.shah@xilinx.com>
From: Rajan Vaja <rajan.vaja@xilinx.com>
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>
---
drivers/clk/zynqmp/clkc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
index 4dd8413..ff2d229 100644
--- a/drivers/clk/zynqmp/clkc.c
+++ b/drivers/clk/zynqmp/clkc.c
@@ -667,6 +667,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;
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-02 21:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 21:50 [PATCH v2 0/4] drivers: clk: zynqmp: minor bux fixes for zynqmp clock driver Jolly Shah
2020-03-02 21:50 ` [PATCH v2 1/4] drivers: clk: zynqmp: Limit bestdiv with maxdiv Jolly Shah
2020-05-27 1:01 ` Stephen Boyd
2020-03-02 21:50 ` [PATCH v2 2/4] drivers: clk: zynqmp: Fix divider2 calculation Jolly Shah
2020-05-27 1:01 ` Stephen Boyd
2020-03-02 21:50 ` Jolly Shah [this message]
2020-05-27 1:01 ` [PATCH v2 3/4] drivers: clk: zynqmp: Fix invalid clock name queries Stephen Boyd
2020-03-02 21:50 ` [PATCH v2 4/4] drivers: clk: zynqmp: fix memory leak in zynqmp_register_clocks Jolly Shah
2020-05-27 1:01 ` Stephen Boyd
2020-03-23 21:15 ` [PATCH v2 0/4] drivers: clk: zynqmp: minor bux fixes for zynqmp clock driver Jolly Shah
2020-04-09 20:44 ` Jolly Shah
2020-04-21 7:50 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1583185843-20707-4-git-send-email-jolly.shah@xilinx.com \
--to=jolly.shah@xilinx.com \
--cc=arm@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=mturquette@baylibre.com \
--cc=olof@lixom.net \
--cc=rajan.vaja@xilinx.com \
--cc=rajanv@xilinx.com \
--cc=sboyd@kernel.org \
--cc=tejas.patel@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox