All of lore.kernel.org
 help / color / mirror / Atom feed
* [LINUX PATCHv5] clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers
@ 2019-03-30 12:02 Shubhrajyoti Datta
  2019-04-10 21:38 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Shubhrajyoti Datta @ 2019-03-30 12:02 UTC (permalink / raw)
  To: linux-clk; +Cc: sboyd, Shubhrajyoti Datta

In case the provider clock is not yet probed the fixed factor does not
find the name of the parent clock. This is because the parent clock is
not yet probed and in case of zynqmp the output-names is omitted.

This is a temporary solution however the critical components
like firmware probe should happen early.
Fixes a probe failure.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
v2:Fix the return value in other cases

 drivers/clk/clk-fixed-factor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index f3ae4ff..36cbb0c 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -171,6 +171,8 @@ static struct clk *_of_fixed_factor_clk_setup(struct device_node *node)

        of_property_read_string(node, "clock-output-names", &clk_name);
        parent_name = of_clk_get_parent_name(node, 0);
+       if (!parent_name)
+               return ERR_PTR(-EPROBE_DEFER);

        if (of_match_node(set_rate_parent_matches, node))
                flags |= CLK_SET_RATE_PARENT;
--
2.1.1

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

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

* Re: [LINUX PATCHv5] clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers
  2019-03-30 12:02 [LINUX PATCHv5] clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers Shubhrajyoti Datta
@ 2019-04-10 21:38 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2019-04-10 21:38 UTC (permalink / raw)
  To: Shubhrajyoti Datta, linux-clk; +Cc: Shubhrajyoti Datta

Quoting Shubhrajyoti Datta (2019-03-30 05:02:18)
> In case the provider clock is not yet probed the fixed factor does not
> find the name of the parent clock. This is because the parent clock is
> not yet probed and in case of zynqmp the output-names is omitted.
> 
> This is a temporary solution however the critical components
> like firmware probe should happen early.
> Fixes a probe failure.
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> ---

I'd prefer we move this to use the clk parent rewrite series I sent the
other day. That way the parents can be fetched when the clk is
registered or found later when the parent is registered. Can you try out
that series?

	https://lkml.kernel.org/r/20190404215344.6330-1-sboyd@kernel.org


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

end of thread, other threads:[~2019-04-10 21:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-30 12:02 [LINUX PATCHv5] clk: clk-fixed-factor: Return EPROBE_DEFER to wait for dependent drivers Shubhrajyoti Datta
2019-04-10 21:38 ` Stephen Boyd

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.