All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagar Kadam <sagar.kadam@sifive.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sifive: riscv: update Hifive Unleashed configuration infrastructure
Date: Thu, 1 Aug 2019 22:31:32 +0530	[thread overview]
Message-ID: <CAARK3Hm1rDn6sZNZz9X8Ex4oD6ahL7nYftQfMYvBQEE9vs6C-Q@mail.gmail.com> (raw)
In-Reply-To: <CAAhSdy1HWZCfWOBg4gt5L_xP8exgTLW=f5EWXUn+HaVbjQH92w@mail.gmail.com>

Hi Anup,

On Thu, Aug 1, 2019 at 9:26 PM Anup Patel <anup@brainfault.org> wrote:
>
> On Thu, Aug 1, 2019 at 8:26 PM Sagar Kadam <sagar.kadam@sifive.com> wrote:
> >
> > Hi Anup,
> >
> > On Wed, Jul 31, 2019 at 1:50 PM Anup Patel <anup@brainfault.org> wrote:
> > >
> > > On Tue, Jul 30, 2019 at 11:01 PM Sagar Kadam <sagar.kadam@sifive.com> wrote:
> > > >
> > > > Hello Anup,
> > > >
> > > > On Tue, Jul 30, 2019 at 9:12 AM Anup Patel <anup@brainfault.org> wrote:
> > > > >
> > > > > On Mon, Jul 29, 2019 at 6:13 PM Sagar Shrikant Kadam
> > > > > <sagar.kadam@sifive.com> wrote:
> > > > > >
> > > > > > This patch aligns the current implementation of HiFive Unleashed
> > > > > > board configuration framework with the one described in doc/README.kconfig.
> > > > > >
> > > > > > Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com>
> > > > > > ---
> > > > > >  arch/riscv/Kconfig                           |   6 +-
> > > > > >  arch/riscv/cpu/generic/Kconfig               |  12 ---
> > > > > >  arch/riscv/cpu/generic/Makefile              |   6 --
> > > > > >  arch/riscv/cpu/generic/cpu.c                 |  35 -------
> > > > > >  arch/riscv/cpu/generic/dram.c                |  37 -------
> > > > > >  arch/riscv/cpu/u54-mc/Kconfig                |  12 +++
> > > > > >  arch/riscv/cpu/u54-mc/Makefile               |   6 ++
> > > > > >  arch/riscv/cpu/u54-mc/cpu.c                  |  35 +++++++
> > > > > >  arch/riscv/cpu/u54-mc/dram.c                 |  37 +++++++
> > > > > >  arch/riscv/include/asm/arch-fu540-c000/clk.h |  14 +++
> > > > > >  arch/riscv/include/asm/arch-generic/clk.h    |  14 ---
> > > > > >  board/sifive/fu540/Kconfig                   |  49 ----------
> > > > > >  board/sifive/fu540/MAINTAINERS               |   9 --
> > > > > >  board/sifive/fu540/Makefile                  |   5 -
> > > > > >  board/sifive/fu540/fu540.c                   | 139 ---------------------------
> > > > > >  board/sifive/hifive_unleashed/Kconfig        |  52 ++++++++++
> > > > > >  board/sifive/hifive_unleashed/MAINTAINERS    |   9 ++
> > > > > >  board/sifive/hifive_unleashed/Makefile       |   5 +
> > > > > >  board/sifive/hifive_unleashed/fu540.c        | 139 +++++++++++++++++++++++++++
> > > > > >  configs/hifive_unleashed_defconfig           |  11 +++
> > > > > >  configs/sifive_fu540_defconfig               |  11 ---
> > > > > >  include/configs/hifive_unleashed.h           |  47 +++++++++
> > > > > >  include/configs/sifive-fu540.h               |  47 ---------
> > > > > >  23 files changed, 370 insertions(+), 367 deletions(-)
> > > > > >  delete mode 100644 arch/riscv/cpu/generic/Kconfig
> > > > > >  delete mode 100644 arch/riscv/cpu/generic/Makefile
> > > > > >  delete mode 100644 arch/riscv/cpu/generic/cpu.c
> > > > > >  delete mode 100644 arch/riscv/cpu/generic/dram.c
> > > > > >  create mode 100644 arch/riscv/cpu/u54-mc/Kconfig
> > > > > >  create mode 100644 arch/riscv/cpu/u54-mc/Makefile
> > > > > >  create mode 100644 arch/riscv/cpu/u54-mc/cpu.c
> > > > > >  create mode 100644 arch/riscv/cpu/u54-mc/dram.c
> > > > > >  create mode 100644 arch/riscv/include/asm/arch-fu540-c000/clk.h
> > > > > >  delete mode 100644 arch/riscv/include/asm/arch-generic/clk.h
> > > > > >  delete mode 100644 board/sifive/fu540/Kconfig
> > > > > >  delete mode 100644 board/sifive/fu540/MAINTAINERS
> > > > > >  delete mode 100644 board/sifive/fu540/Makefile
> > > > > >  delete mode 100644 board/sifive/fu540/fu540.c
> > > > > >  create mode 100644 board/sifive/hifive_unleashed/Kconfig
> > > > > >  create mode 100644 board/sifive/hifive_unleashed/MAINTAINERS
> > > > > >  create mode 100644 board/sifive/hifive_unleashed/Makefile
> > > > > >  create mode 100644 board/sifive/hifive_unleashed/fu540.c
> > > > > >  create mode 100644 configs/hifive_unleashed_defconfig
> > > > > >  delete mode 100644 configs/sifive_fu540_defconfig
> > > > > >  create mode 100644 include/configs/hifive_unleashed.h
> > > > > >  delete mode 100644 include/configs/sifive-fu540.h
> > > > > >
> > > > >
> > > > > I agree with Bin's concerns.
> > > > >
> > > > > Please don't rename generic CPU support under arch/riscv
> > > > >
> > > > > We should think long-term here. If every SOC vendor starts adding
> > > > > their CPU support directory under arch/riscv then U-Boot RISC port
> > > > > will be eventually difficult to manage and we will also have duplicate
> > > > > code across various CPU support.
> > > > >
> > > > > IMHO, we should avoid adding new CPU support under arch/riscv
> > > > > as much as possible. We can call weak functions from generic CPU
> > > > > support and board support code can implement it. We should only
> > > > > add new CPU support under arch/riscv when we are not able to
> > > > > re-use generic CPU support.
> > > > >
> > > >
> > > > Yes, your points are valid. I am Ok with it.
> > > > My intent here was that as the support for riscv in U-boot is in its
> > > > early stages
> > > > and doing it now would be better as minimum changes will be required and
> > > > going ahead as other CPU vendors introduce their CPU under arch/riscv/
> > > > we could isolate a generic CPU code as it grows.
> > >
> > > Thanks.
> > >
> > > Let's try to make arch/riscv/cpu/generic extensible from start itself so
> > > that it is relatively easy to fit newer RISC-V SOCs and boards.
> > >
> > Thanks. So can I assume that we agree on adding new CPU support under
> > arch/riscv. Will provide a new patch for the same.
>
> I think you misunderstood my previous comment.
>
> We should use the generic CPU support from start itself and promote use of
> generic CPU support as much as possible.
>

Ohh, Ok, thanks for clarifying my assumption.

> Adding specific CPU support under arch/riscv will require strong justification
> about why generic CPU support is not suitable for particular SOC.
>
> Regards,
> Anup
>
Regards,
Sagar
> > > >
> > > > >
> > > > > Other board support renaming is fine but there is lot of documentation
> > > > If board support renaming is fine. Shall I submit another patch
> > > > excluding the CPU
> > > > changes?
> > >
> > > Yes, please send another revision.
> > >
> > Yes, I will do send another revision.
> >
> > > Also have consider updating U-Boot and OpenSBI documentation as
> > > separate patches.
> > >
> > Yes, I will also update the docs accordingly.
> >
> > Thanks & BR,
> > Sagar Kadam
> > > Regards,
> > > Anup

      reply	other threads:[~2019-08-01 17:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 12:42 [U-Boot] [PATCH] sifive: riscv: streamline HiFive Unleashed configuration infrastructure Sagar Shrikant Kadam
2019-07-29 12:42 ` [U-Boot] [PATCH] sifive: riscv: update Hifive " Sagar Shrikant Kadam
2019-07-29 13:45   ` Bin Meng
2019-07-30 17:10     ` Sagar Kadam
2019-07-31  8:32       ` Andreas Schwab
2019-08-01 15:00         ` Sagar Kadam
2019-07-30  3:42   ` Anup Patel
2019-07-30 17:31     ` Sagar Kadam
2019-07-31  8:20       ` Anup Patel
2019-08-01 14:56         ` Sagar Kadam
2019-08-01 15:56           ` Anup Patel
2019-08-01 17:01             ` Sagar Kadam [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAARK3Hm1rDn6sZNZz9X8Ex4oD6ahL7nYftQfMYvBQEE9vs6C-Q@mail.gmail.com \
    --to=sagar.kadam@sifive.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.