[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191108211410.0411720869@mail.kernel.org>
Date: Fri, 08 Nov 2019 13:14:09 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: Rob Clark <robdclark@...omium.org>
Cc: Matthias Kaehlcke <mka@...omium.org>,
Taniya Das <tdas@...eaurora.org>,
Michael Turquette <mturquette@...libre.com>,
David Brown <david.brown@...aro.org>,
Rajendra Nayak <rnayak@...eaurora.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
linux-soc@...r.kernel.org, linux-clk@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>, devicetree@...r.kernel.org,
robh@...nel.org, Rob Herring <robh+dt@...nel.org>,
Jordan Crouse <jcrouse@...eaurora.org>,
Jeykumar Sankaran <jsanka@...eaurora.org>,
Sean Paul <seanpaul@...omium.org>
Subject: Re: [PATCH v4 5/5] clk: qcom: Add Global Clock controller (GCC) driver for SC7180
Quoting Rob Clark (2019-11-08 11:40:53)
> On Fri, Nov 8, 2019 at 10:42 AM Stephen Boyd <sboyd@...nel.org> wrote:
> >
> > So the scenario is DT describes the clk
> >
> > dpu_node {
> > clocks = <&cc AHB_CLK>;
> > clock-names = "iface";
> > }
> >
> > but the &cc node has a driver that doesn't probe?
> >
> > I believe in this scenario we return -EPROBE_DEFER because we assume we
> > should wait for the clk driver to probe and provide the iface clk. See
> > of_clk_get_hw_from_clkspec() and how it looks through a list of clk
> > providers and tries to match the &cc phandle to some provider.
> >
> > Once the driver probes, the match will happen and we'll be able to look
> > up the clk in the provider with __of_clk_get_hw_from_provider(). If
> > the clk provider decides that there isn't a clk object, it will return
> > NULL and then eventually clk_hw_create_clk() will turn the NULL return
> > value into a NULL pointer to return from clk_get().
> >
>
> ok, that was the scenario I was worried about (since unclk'd register
> access tends to be insta-reboot and hard to debug).. so I think it
> should be ok to make dpu just ignore NULL clks.
>
> From a quick look, I think something like the attached (untested).
> (Sorry, I'd just paste it inline but gmail somehow eats all the
> whitespace when I do that :-/)
Cool. Looks good to me.
Powered by blists - more mailing lists