All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 4/4] riscv: Setup reserved-memory node for FU540
Date: Sat, 14 Mar 2020 18:17:56 +0800	[thread overview]
Message-ID: <CAEUhbmX=f3XpBV_g2=_wmbzGP=jqr8_Ui0mAGQPvsMiSTCm3tg@mail.gmail.com> (raw)
In-Reply-To: <20200314001132.17393-5-atish.patra@wdc.com>

Hi Atish,

On Sat, Mar 14, 2020 at 8:11 AM Atish Patra <atish.patra@wdc.com> wrote:
>
> FU540 uses OF_SEPARATE instead of OF_PRIOR.
>
> Enable OF_BOARD_FIXUP to update the DT with reserved-memory node.
>
> Signed-off-by: Atish Patra <atish.patra@wdc.com>
> ---
>  board/sifive/fu540/fu540.c     | 15 +++++++++++++++
>  configs/sifive_fu540_defconfig |  1 +
>  2 files changed, 16 insertions(+)
>
> diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c
> index 47a20902517c..82b3a9c8e729 100644
> --- a/board/sifive/fu540/fu540.c
> +++ b/board/sifive/fu540/fu540.c
> @@ -141,6 +141,21 @@ int misc_init_r(void)
>
>  #endif
>
> +#ifdef CONFIG_OF_BOARD_FIXUP
> +int board_fix_fdt(void *fdt)

This is used to fix-up the DT that U-Boot uses, not the DT that
operating system uses.

As I mentioned in
https://github.com/riscv/riscv-sbi-doc/pull/37#issuecomment-596184723,
we need consider U-Boot SPL usage.

> +{
> +       int err;
> +
> +       err = riscv_board_reserved_mem_fixup(fdt);
> +       if (err < 0) {
> +               printf("failed to fixup DT for reserved memory: %d\n", err);
> +               return err;
> +       }
> +
> +       return 0;
> +}
> +#endif
> +
>  int board_init(void)
>  {
>         /* For now nothing to do here. */
> diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig
> index 6d61e6c960ee..8fb3794cd578 100644
> --- a/configs/sifive_fu540_defconfig
> +++ b/configs/sifive_fu540_defconfig
> @@ -12,3 +12,4 @@ CONFIG_DISPLAY_BOARDINFO=y
>  CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00"
>  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
>  CONFIG_DM_MTD=y
> +CONFIG_OF_BOARD_FIXUP=y
> --

Regards,
Bin

  parent reply	other threads:[~2020-03-14 10:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-14  0:11 [PATCH v2 0/4] DT related fixes for RISC-V UEFI Atish Patra
2020-03-14  0:11 ` [PATCH v2 1/4] riscv: Add boot hartid to Device tree Atish Patra
2020-03-14  0:53   ` Atish Patra
2020-03-14  0:11 ` [PATCH v2 2/4] cmd: bootefi: Parse reserved-memory node from DT Atish Patra
2020-03-14  0:55   ` Atish Patra
2020-03-14  7:14     ` Heinrich Schuchardt
2020-03-14  8:50       ` Heinrich Schuchardt
2020-03-18  9:10       ` Atish Patra
2020-03-14  0:11 ` [PATCH v2 3/4] riscv: Provide a mechanism for riscv boards to parse reserved memory Atish Patra
2020-03-14  0:54   ` Atish Patra
2020-03-14  9:59     ` Bin Meng
2020-03-16 19:07       ` Atish Patra
2020-03-14  0:11 ` [PATCH v2 4/4] riscv: Setup reserved-memory node for FU540 Atish Patra
2020-03-14  0:55   ` Atish Patra
2020-03-14 10:17   ` Bin Meng [this message]
2020-03-16 19:21     ` Atish Patra
2020-03-14  0:53 ` [PATCH v2 0/4] DT related fixes for RISC-V UEFI Atish Patra

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='CAEUhbmX=f3XpBV_g2=_wmbzGP=jqr8_Ui0mAGQPvsMiSTCm3tg@mail.gmail.com' \
    --to=bmeng.cn@gmail.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.