All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] versal: drivers: clk: Fix invalid clock name queries
@ 2020-01-17  7:31 Michal Simek
  2020-02-28 11:16 ` Michal Simek
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2020-01-17  7:31 UTC (permalink / raw)
  To: u-boot

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 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>
---

 drivers/clk/clk_versal.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 7e97b0c4bf3a..6ca46c612df8 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -569,6 +569,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;
-- 
2.25.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] versal: drivers: clk: Fix invalid clock name queries
  2020-01-17  7:31 [PATCH] versal: drivers: clk: Fix invalid clock name queries Michal Simek
@ 2020-02-28 11:16 ` Michal Simek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2020-02-28 11:16 UTC (permalink / raw)
  To: u-boot

p? 17. 1. 2020 v 8:31 odes?latel Michal Simek <michal.simek@xilinx.com> napsal:
>
> 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 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>
> ---
>
>  drivers/clk/clk_versal.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
> index 7e97b0c4bf3a..6ca46c612df8 100644
> --- a/drivers/clk/clk_versal.c
> +++ b/drivers/clk/clk_versal.c
> @@ -569,6 +569,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;
> --
> 2.25.0
>

Applied.
M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-28 11:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17  7:31 [PATCH] versal: drivers: clk: Fix invalid clock name queries Michal Simek
2020-02-28 11:16 ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.