lkml.org 
[lkml]   [2019]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v4 5/5] clk: qcom: Add Global Clock controller (GCC) driver for SC7180
    Date
    Quoting Rob Clark (2019-11-08 11:40:53)
    > On Fri, Nov 8, 2019 at 10:42 AM Stephen Boyd <sboyd@kernel.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.

    \
     
     \ /
      Last update: 2019-11-08 22:15    [W:2.258 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site