Re: [PATCH v2 5/5] arm64: dts: qcom: sc7280: Add herobrine-r1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Doug Anderson (2022-01-31 08:44:35)
> Hi,
>
> On Thu, Jan 27, 2022 at 1:16 PM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote:
> >
> > ----8<-----
> > diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c
> > b/drivers/cpufreq/cpufreq-dt-platdev.c
> > index ca1d103ec449..32bfe453f8b4 100644
> > --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> > +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> > @@ -179,25 +179,29 @@ static bool __init cpu0_node_has_opp_v2_prop(void)
> >  static int __init cpufreq_dt_platdev_init(void)
> >  {
> >         struct device_node *np = of_find_node_by_path("/");
> > +       struct device_node *soc_np = of_find_node_by_path("/soc");
>
> Seems that some device trees have "/soc" and others "/soc@0". For at
> least a little context, see commit a1875bf98290 ("arm64: dts: qcom:
> sdm845: Add unit name to soc node"). Since (presumably) this would
> only be for newer SoCs then I guess you should search for "/soc@0"?
> ...and then if we ever have a SoC that's not @0 then we would have to
> iterate through all SoCs
>

Yes. We can probably just use of_find_node_by_name(NULL, "soc") instead
though and then if there are multiple soc nodes in the future we can
iterate over all the soc nodes with for_each_of_allnodes_from() and make
this logic more complicated. I'd rather not implement any of that
complicated logic until we need to though.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux