[U-Boot] [i.MX8MM+CCF 12/41] clk: fixed_rate: add pre reloc flag

Bin Meng bmeng.cn at gmail.com
Tue May 7 14:00:14 UTC 2019


Hi Peng,

On Tue, May 7, 2019 at 9:30 PM Peng Fan <peng.fan at nxp.com> wrote:
>
> > Subject: Re: [i.MX8MM+CCF 12/41] clk: fixed_rate: add pre reloc flag
> >
> > On Tue, 30 Apr 2019 10:18:12 +0000
> > Peng Fan <peng.fan at nxp.com> wrote:
> >
> > > Add pre reloc flag to use this driver before relocation
> > >
> > > Signed-off-by: Peng Fan <peng.fan at nxp.com>
> > > ---
> > >  drivers/clk/clk_fixed_rate.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/clk/clk_fixed_rate.c
> > > b/drivers/clk/clk_fixed_rate.c index 069e643fbc..debada1463 100644
> > > --- a/drivers/clk/clk_fixed_rate.c
> > > +++ b/drivers/clk/clk_fixed_rate.c
> > > @@ -45,4 +45,5 @@ U_BOOT_DRIVER(clk_fixed_rate) = {
> > >     .ofdata_to_platdata = clk_fixed_rate_ofdata_to_platdata,
> > >     .platdata_auto_alloc_size = sizeof(struct clk_fixed_rate),
> > >     .ops = &clk_fixed_rate_ops,
> > > +   .flags = DM_FLAG_PRE_RELOC,
> > >  };
> >
> > This probably shall be done with proper dts file (from TPC70 - imx6q
> > conversion code):
>
> My understanding is DM_FLAG_PRE_RELOC will let the driver could be used
> before relocation. The dts u-boot,dm-spl or u-boot,dm-pre-reloc
> is just to mark the device could be used at the corresponding stage.
> Only modify dts will not make it work without the DM_FLAG_PRE_RELOC,
> Right?
>

I think your understanding is correct. For device tree that cannot be
modified by U-Boot, eg: DT passed from previous bootloader, the only
way to support pre-relocation binding is to add DM_FLAG_PRE_RELOC in
the U-Boot driver.

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

Regards,
Bin


More information about the U-Boot mailing list