diff mbox series

[4/7] arch: snapdragon: clock: Always bind before relocation

Message ID 20230324004040.572525-4-konrad.dybcio@linaro.org
State New
Headers show
Series [1/7] mmc: msm_sdhci: Match clocks through "clocks" property | expand

Commit Message

Konrad Dybcio March 24, 2023, 12:40 a.m. UTC
In preparation for supporting upstream Linux device trees on Qualcomm
platforms, make this the default behavior.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---

 arch/arm/mach-snapdragon/clock-snapdragon.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sumit Garg March 24, 2023, 6:06 a.m. UTC | #1
On Fri, 24 Mar 2023 at 07:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> In preparation for supporting upstream Linux device trees on Qualcomm
> platforms, make this the default behavior.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>
>  arch/arm/mach-snapdragon/clock-snapdragon.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.c b/arch/arm/mach-snapdragon/clock-snapdragon.c
> index 0ac45dce9a92..d1af5d1fec7d 100644
> --- a/arch/arm/mach-snapdragon/clock-snapdragon.c
> +++ b/arch/arm/mach-snapdragon/clock-snapdragon.c
> @@ -178,4 +178,5 @@ U_BOOT_DRIVER(clk_msm) = {
>         .ops            = &msm_clk_ops,
>         .priv_auto      = sizeof(struct msm_clk_priv),
>         .probe          = msm_clk_probe,
> +       .flags          = DM_FLAG_PRE_RELOC,

"u-boot,dm-pre-reloc" serves the same purpose but this looks even
better as we would like the serial driver to be enabled by default
prior to relocation. So you need to get rid of redundant
"u-boot,dm-pre-reloc" from corresponding <platform>-uboot.dtsi files.

-Sumit

>  };
> --
> 2.40.0
>
Tom Rini March 24, 2023, 3:24 p.m. UTC | #2
On Fri, Mar 24, 2023 at 11:36:24AM +0530, Sumit Garg wrote:
> On Fri, 24 Mar 2023 at 07:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> >
> > In preparation for supporting upstream Linux device trees on Qualcomm
> > platforms, make this the default behavior.
> >
> > Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> > ---
> >
> >  arch/arm/mach-snapdragon/clock-snapdragon.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.c b/arch/arm/mach-snapdragon/clock-snapdragon.c
> > index 0ac45dce9a92..d1af5d1fec7d 100644
> > --- a/arch/arm/mach-snapdragon/clock-snapdragon.c
> > +++ b/arch/arm/mach-snapdragon/clock-snapdragon.c
> > @@ -178,4 +178,5 @@ U_BOOT_DRIVER(clk_msm) = {
> >         .ops            = &msm_clk_ops,
> >         .priv_auto      = sizeof(struct msm_clk_priv),
> >         .probe          = msm_clk_probe,
> > +       .flags          = DM_FLAG_PRE_RELOC,
> 
> "u-boot,dm-pre-reloc" serves the same purpose but this looks even
> better as we would like the serial driver to be enabled by default
> prior to relocation. So you need to get rid of redundant
> "u-boot,dm-pre-reloc" from corresponding <platform>-uboot.dtsi files.

And in turn u-boot,dm-* are now bootph-* flags which can (should!) be
part of the upstream dts file.
Sumit Garg March 27, 2023, 5:37 a.m. UTC | #3
On Fri, 24 Mar 2023 at 20:54, Tom Rini <trini@konsulko.com> wrote:
>
> On Fri, Mar 24, 2023 at 11:36:24AM +0530, Sumit Garg wrote:
> > On Fri, 24 Mar 2023 at 07:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> > >
> > > In preparation for supporting upstream Linux device trees on Qualcomm
> > > platforms, make this the default behavior.
> > >
> > > Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> > > ---
> > >
> > >  arch/arm/mach-snapdragon/clock-snapdragon.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.c b/arch/arm/mach-snapdragon/clock-snapdragon.c
> > > index 0ac45dce9a92..d1af5d1fec7d 100644
> > > --- a/arch/arm/mach-snapdragon/clock-snapdragon.c
> > > +++ b/arch/arm/mach-snapdragon/clock-snapdragon.c
> > > @@ -178,4 +178,5 @@ U_BOOT_DRIVER(clk_msm) = {
> > >         .ops            = &msm_clk_ops,
> > >         .priv_auto      = sizeof(struct msm_clk_priv),
> > >         .probe          = msm_clk_probe,
> > > +       .flags          = DM_FLAG_PRE_RELOC,
> >
> > "u-boot,dm-pre-reloc" serves the same purpose but this looks even
> > better as we would like the serial driver to be enabled by default
> > prior to relocation. So you need to get rid of redundant
> > "u-boot,dm-pre-reloc" from corresponding <platform>-uboot.dtsi files.
>
> And in turn u-boot,dm-* are now bootph-* flags which can (should!) be
> part of the upstream dts file.
>

That's good to know. Can you share a reference to the patch set adding
support for bootph-* flags?

-Sumit

> --
> Tom
Tom Rini March 27, 2023, 4:24 p.m. UTC | #4
On Mon, Mar 27, 2023 at 11:07:06AM +0530, Sumit Garg wrote:
> On Fri, 24 Mar 2023 at 20:54, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Fri, Mar 24, 2023 at 11:36:24AM +0530, Sumit Garg wrote:
> > > On Fri, 24 Mar 2023 at 07:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
> > > >
> > > > In preparation for supporting upstream Linux device trees on Qualcomm
> > > > platforms, make this the default behavior.
> > > >
> > > > Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> > > > ---
> > > >
> > > >  arch/arm/mach-snapdragon/clock-snapdragon.c | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.c b/arch/arm/mach-snapdragon/clock-snapdragon.c
> > > > index 0ac45dce9a92..d1af5d1fec7d 100644
> > > > --- a/arch/arm/mach-snapdragon/clock-snapdragon.c
> > > > +++ b/arch/arm/mach-snapdragon/clock-snapdragon.c
> > > > @@ -178,4 +178,5 @@ U_BOOT_DRIVER(clk_msm) = {
> > > >         .ops            = &msm_clk_ops,
> > > >         .priv_auto      = sizeof(struct msm_clk_priv),
> > > >         .probe          = msm_clk_probe,
> > > > +       .flags          = DM_FLAG_PRE_RELOC,
> > >
> > > "u-boot,dm-pre-reloc" serves the same purpose but this looks even
> > > better as we would like the serial driver to be enabled by default
> > > prior to relocation. So you need to get rid of redundant
> > > "u-boot,dm-pre-reloc" from corresponding <platform>-uboot.dtsi files.
> >
> > And in turn u-boot,dm-* are now bootph-* flags which can (should!) be
> > part of the upstream dts file.
> >
> 
> That's good to know. Can you share a reference to the patch set adding
> support for bootph-* flags?

https://github.com/devicetree-org/dt-schema/commit/63bd8472dfc6951eae1c95b27ac8cbc88f4cb3b0
diff mbox series

Patch

diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.c b/arch/arm/mach-snapdragon/clock-snapdragon.c
index 0ac45dce9a92..d1af5d1fec7d 100644
--- a/arch/arm/mach-snapdragon/clock-snapdragon.c
+++ b/arch/arm/mach-snapdragon/clock-snapdragon.c
@@ -178,4 +178,5 @@  U_BOOT_DRIVER(clk_msm) = {
 	.ops		= &msm_clk_ops,
 	.priv_auto	= sizeof(struct msm_clk_priv),
 	.probe		= msm_clk_probe,
+	.flags		= DM_FLAG_PRE_RELOC,
 };