Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jun 2023 09:59:54 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        titus <titus@edc.ro>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: driver loading order
Message-ID:  <CANCZdfqs_cpCypAA9AyOPad4fj0spVg%2BH15qFVvPdB67hq6-9A@mail.gmail.com>
In-Reply-To: <8E9A4B08-EFD7-4872-B789-698B77A0DACB@edc.ro>
References:  <8E9A4B08-EFD7-4872-B789-698B77A0DACB@edc.ro>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000050749e05fe4147fc
Content-Type: text/plain; charset="UTF-8"

On Fri, Jun 16, 2023, 9:55 AM titus <titus@edc.ro> wrote:

> what is the correct method for loading drivers in a specific order
> I hacked a driver for pwm-regulator so i can have cpufreq_dt
> so rk_pwm/pwm needs to be loaded before the pwm-regulator driver and after
> the clock
> driver
> i changed the pass arg for EARLY_DRIVER_MODULE and in the end it worked
> but im not sure this is the best way
>

That's generally the best way for things like clocks and regulators. Those
item enable other devices to work, so should be attached in an earlier pass.

Warner

thanks
>

--00000000000050749e05fe4147fc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Fri, Jun 16, 2023, 9:55 AM titus &lt;<a href=3D"mai=
lto:titus@edc.ro">titus@edc.ro</a>&gt; wrote:<br></div><blockquote class=3D=
"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding=
-left:1ex">what is the correct method for loading drivers in a specific ord=
er<br>
I hacked a driver for pwm-regulator so i can have cpufreq_dt<br>
so rk_pwm/pwm needs to be loaded before the pwm-regulator driver and after =
the clock <br>
driver<br>
i changed the pass arg for EARLY_DRIVER_MODULE and in the end it worked but=
 im not sure this is the best way<br></blockquote></div></div><div dir=3D"a=
uto"><br></div><div dir=3D"auto">That&#39;s generally the best way for thin=
gs like clocks and regulators. Those item enable other devices to work, so =
should be attached in an earlier pass.</div><div dir=3D"auto"><br></div><di=
v dir=3D"auto">Warner=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"au=
to"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
thanks <br>
</blockquote></div></div></div>

--00000000000050749e05fe4147fc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqs_cpCypAA9AyOPad4fj0spVg%2BH15qFVvPdB67hq6-9A>