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: rajanv@xilinx.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Rajan Vaja <rajan.vaja@xilinx.com>,
Tejas Patel <tejas.patel@xilinx.com>,
Jolly Shah <jolly.shah@xilinx.com>
Subject: [PATCH 3/4] drivers: clk: Fix invalid clock name queries
Date: Mon, 2 Mar 2020 13:43:33 -0800 [thread overview]
Message-ID: <1583185414-20106-4-git-send-email-jolly.shah@xilinx.com> (raw)
In-Reply-To: <1583185414-20106-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
next prev parent reply other threads:[~2020-03-02 21:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 21:43 [PATCH 0/4] Clock driver fixes Jolly Shah
2020-03-02 21:43 ` [PATCH 1/4] clk: zynqmp: Limit bestdiv with maxdiv Jolly Shah
2020-03-02 21:43 ` [PATCH 2/4] drivers: clk: zynqmp: Fix divider2 calculation Jolly Shah
2020-03-02 21:43 ` Jolly Shah [this message]
2020-03-02 21:43 ` [PATCH 4/4] clk: zynqmp: fix memory leak in zynqmp_register_clocks Jolly Shah
2020-03-23 21:13 ` [PATCH 0/4] Clock driver fixes Jolly Shah
2020-03-23 21:16 ` Jolly Shah
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=1583185414-20106-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
all inboxes | Powered by JetHome®