[PATCH v4 4/7] drivers: ram: sifive: rename fu540_ddr and add fu740 support

Green Wan green.wan at sifive.com
Tue Apr 6 17:34:06 CEST 2021


On Tue, Apr 6, 2021 at 4:57 PM Bin Meng <bmeng.cn at gmail.com> wrote:
>
> On Fri, Mar 26, 2021 at 11:54 PM Green Wan <green.wan at sifive.com> wrote:
> >
> > Rename fu540_ddr.c to sifive_ddr.c and add fu740 support
> >
> > Signed-off-by: Green Wan <green.wan at sifive.com>
> > ---
> >  drivers/ram/sifive/Kconfig                    |  8 +-
> >  drivers/ram/sifive/Makefile                   |  2 +-
> >  .../ram/sifive/{fu540_ddr.c => sifive_ddr.c}  | 90 +++++++++----------
> >  3 files changed, 50 insertions(+), 50 deletions(-)
> >  rename drivers/ram/sifive/{fu540_ddr.c => sifive_ddr.c} (81%)
> >
> > diff --git a/drivers/ram/sifive/Kconfig b/drivers/ram/sifive/Kconfig
> > index 08de692e02..0aaac02656 100644
> > --- a/drivers/ram/sifive/Kconfig
> > +++ b/drivers/ram/sifive/Kconfig
> > @@ -5,9 +5,9 @@ config RAM_SIFIVE
> >         help
> >           This enables support for ram drivers of SiFive SoCs.
> >
> > -config SIFIVE_FU540_DDR
> > -       bool "SiFive FU540 DDR driver"
> > +config SIFIVE_DDR
> > +       bool "SiFive DDR driver"
> >         depends on RAM_SIFIVE
> > -       default y if TARGET_SIFIVE_UNLEASHED
> > +       default y if TARGET_SIFIVE_UNLEASHED || TARGET_SIFIVE_UNMATCHED
> >         help
> > -         This enables DDR support for the platforms based on SiFive FU540 SoC.
> > +         This enables DDR support for the platforms based on SiFive SoC.
> > diff --git a/drivers/ram/sifive/Makefile b/drivers/ram/sifive/Makefile
> > index d66efec264..4ef89f85bb 100644
> > --- a/drivers/ram/sifive/Makefile
> > +++ b/drivers/ram/sifive/Makefile
> > @@ -3,4 +3,4 @@
> >  # Copyright (c) 2020 SiFive, Inc
> >  #
> >
> > -obj-$(CONFIG_SIFIVE_FU540_DDR) += fu540_ddr.o
> > +obj-$(CONFIG_SIFIVE_DDR) += sifive_ddr.o
> > diff --git a/drivers/ram/sifive/fu540_ddr.c b/drivers/ram/sifive/sifive_ddr.c
> > similarity index 81%
> > rename from drivers/ram/sifive/fu540_ddr.c
> > rename to drivers/ram/sifive/sifive_ddr.c
> > index c0653bb897..2b23c8783c 100644
> > --- a/drivers/ram/sifive/fu540_ddr.c
> > +++ b/drivers/ram/sifive/sifive_ddr.c
> > @@ -1,6 +1,6 @@
> >  // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
> >  /*
> > - * (C) Copyright 2020 SiFive, Inc.
> > + * (C) Copyright 2020-2021 SiFive, Inc.
> >   *
> >   * Authors:
> >   *   Pragnesh Patel <pragnesh.patel at sifive.com>
> > @@ -12,7 +12,6 @@
> >  #include <init.h>
> >  #include <ram.h>
> >  #include <syscon.h>
> > -#include <asm/global_data.h>
>
> Why is this removed?
>

Hi Bin,

I removed it when I was checking whether there are some unnecessary
include files. I didn't notice DECLARE_GLOBAL_DATA_PTR might require
it. But it seems to be included somewhere because I didn't encounter
the compilation error.

If I want to add it back, do you prefer to do it in v5 patch or
another fix patch?

Thanks,

> >  #include <asm/io.h>
> >  #include <clk.h>
> >  #include <wait_bit.h>
> > @@ -65,16 +64,16 @@
> >
> >  DECLARE_GLOBAL_DATA_PTR;
>
> Otherwise LGTM:
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list