[U-Boot] [PATCH] clk: sifive: fu540-prci: align primary DT match string to the DT bindings

Bin Meng bmeng.cn at gmail.com
Thu May 30 05:48:02 UTC 2019


On Thu, May 30, 2019 at 1:06 PM Atish Patra <atish.patra at wdc.com> wrote:
>
> On 5/29/19 6:19 PM, Bin Meng wrote:
> > On Sun, May 26, 2019 at 5:13 PM Paul Walmsley <paul.walmsley at sifive.com> wrote:
> >>
> >> The U-Boot PRCI driver for the SiFive FU540 uses an out-of-date DT
> >> binding string, since the U-boot PRCI driver was upstreamed before the
> >
> > nits: U-boot -> U-Boot
> >
> >> mainline Linux kernel PRCI driver was finished.  This means that the
> >> U-Boot PRCI driver won't probe when used with a DT file that is
> >> aligned to the DT bindings and the driver in the Linux kernel:
> >>
> >>     https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/clock/sifive/fu540-prci.txt#n7
> >>
> >>     https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/sifive/fu540-prci.c#n610
> >>
> >> Fix by aligning the U-Boot DT match string to the string that's used
> >> in the upstream DT bindings and the Linux kernel driver.
> >>
> >>
> >> Signed-off-by: Paul Walmsley <paul.walmsley at sifive.com>
> >> Signed-off-by: Paul Walmsley <paul at pwsan.com>
> >> Cc: Anup Patel <Anup.Patel at wdc.com>
> >> Cc: Atish Patra <atish.patra at wdc.com>
> >> Cc: Alexander Graf <agraf at suse.de>
> >> ---
> >>   drivers/clk/sifive/fu540-prci.c | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c
> >> index 2d47ebc6b1..d79d1a5351 100644
> >> --- a/drivers/clk/sifive/fu540-prci.c
> >> +++ b/drivers/clk/sifive/fu540-prci.c
> >> @@ -589,7 +589,7 @@ static struct clk_ops sifive_fu540_prci_ops = {
> >>   };
> >>
> >>   static const struct udevice_id sifive_fu540_prci_ids[] = {
> >> -       { .compatible = "sifive,fu540-c000-prci0" },
> >> +       { .compatible = "sifive,fu540-c000-prci" },
> >
> > Can we keep the previous compatible string for compatibility reason?
> > U-Boot is now reusing the DT that FSBL passes. Changing the name here
> > means we need re-flash an updated FSBL?
>
> Unfortunately yes. However, you can also use OpenSBI/BBL to use the
> updated DT instead of DT from FSBL.
>
> OpenSBI method: Just use the additional argument during OpenSBI compilation.
>
> FW_PAYLOAD_FDT_PATH=<linux kernel
> source>/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dtb

OK, please update the doc/README.sifive-fu540, to mention an updated
FDT needs to be provided to OpenSBI, if we remove the old compatible
string in the U-Boot PRCI driver.

>
> BBL: Paul has a working branch. Details are here
>
> http://lists.infradead.org/pipermail/linux-riscv/2019-May/004685.html
>

Regards,
Bin


More information about the U-Boot mailing list