diff mbox series

riscv: sifive: Set default fdtfile names.

Message ID 20210615163414.359494-1-dimitri.ledkov@canonical.com
State Superseded
Delegated to: Andes
Headers show
Series riscv: sifive: Set default fdtfile names. | expand

Commit Message

Dimitri John Ledkov June 15, 2021, 4:34 p.m. UTC
Set default fdtfile names for unleashed and unmatched boards, as used
in the upstream Linux kernel. This allows sysboot command to find and
load appropriate dtb for the matching kernel from universal stock
Ubuntu RISCV rootfs images based on fdtdir setting in extlinux.conf.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
cc: Paul Walmsley <paul.walmsley@sifive.com>
cc: Palmer Dabbelt <palmer@dabbelt.com>
cc: Anup Patel <anup.patel@wdc.com>
cc: Atish Patra <atish.patra@wdc.com>
cc: Pragnesh Patel <pragnesh.patel@sifive.com>
cc: Green Wan <green.wan@sifive.com>
---
 configs/sifive_unleashed_defconfig | 1 +
 configs/sifive_unmatched_defconfig | 1 +
 include/configs/sifive-unleashed.h | 1 +
 include/configs/sifive-unmatched.h | 1 +
 4 files changed, 4 insertions(+)

Comments

Leo Liang June 16, 2021, 1:09 a.m. UTC | #1
On Wed, Jun 16, 2021 at 12:34:14AM +0800, Dimitri John Ledkov wrote:
> Set default fdtfile names for unleashed and unmatched boards, as used
> in the upstream Linux kernel. This allows sysboot command to find and
> load appropriate dtb for the matching kernel from universal stock
> Ubuntu RISCV rootfs images based on fdtdir setting in extlinux.conf.
> 
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
> cc: Paul Walmsley <paul.walmsley@sifive.com>
> cc: Palmer Dabbelt <palmer@dabbelt.com>
> cc: Anup Patel <anup.patel@wdc.com>
> cc: Atish Patra <atish.patra@wdc.com>
> cc: Pragnesh Patel <pragnesh.patel@sifive.com>
> cc: Green Wan <green.wan@sifive.com>
> ---
>  configs/sifive_unleashed_defconfig | 1 +
>  configs/sifive_unmatched_defconfig | 1 +
>  include/configs/sifive-unleashed.h | 1 +
>  include/configs/sifive-unmatched.h | 1 +
>  4 files changed, 4 insertions(+)

Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Bin Meng June 16, 2021, 11:56 a.m. UTC | #2
On Wed, Jun 16, 2021 at 12:34 AM Dimitri John Ledkov
<dimitri.ledkov@canonical.com> wrote:
>

nits: please remove the ending . in the commit title

> Set default fdtfile names for unleashed and unmatched boards, as used
> in the upstream Linux kernel. This allows sysboot command to find and
> load appropriate dtb for the matching kernel from universal stock
> Ubuntu RISCV rootfs images based on fdtdir setting in extlinux.conf.

nits: RISC-V

>
> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
> cc: Paul Walmsley <paul.walmsley@sifive.com>
> cc: Palmer Dabbelt <palmer@dabbelt.com>
> cc: Anup Patel <anup.patel@wdc.com>
> cc: Atish Patra <atish.patra@wdc.com>
> cc: Pragnesh Patel <pragnesh.patel@sifive.com>
> cc: Green Wan <green.wan@sifive.com>
> ---
>  configs/sifive_unleashed_defconfig | 1 +
>  configs/sifive_unmatched_defconfig | 1 +
>  include/configs/sifive-unleashed.h | 1 +
>  include/configs/sifive-unmatched.h | 1 +
>  4 files changed, 4 insertions(+)
>

Otherwise,
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

diff --git a/configs/sifive_unleashed_defconfig b/configs/sifive_unleashed_defconfig
index 62416a7c1d..7ef0e4b241 100644
--- a/configs/sifive_unleashed_defconfig
+++ b/configs/sifive_unleashed_defconfig
@@ -14,6 +14,7 @@  CONFIG_RISCV_SMODE=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x84000000
+CONFIG_DEFAULT_FDT_FILE="sifive/hifive-unleashed-a00.dtb"
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_MISC_INIT_R=y
diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
index 01ca2d8c23..66e9a23ee4 100644
--- a/configs/sifive_unmatched_defconfig
+++ b/configs/sifive_unmatched_defconfig
@@ -14,6 +14,7 @@  CONFIG_RISCV_SMODE=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x84000000
+CONFIG_DEFAULT_FDT_FILE="sifive/hifive-unmatched-a00.dtb"
 CONFIG_DISPLAY_CPUINFO=y
 CONFIG_DISPLAY_BOARDINFO=y
 CONFIG_DISPLAY_BOARDINFO_LATE=y
diff --git a/include/configs/sifive-unleashed.h b/include/configs/sifive-unleashed.h
index 0d69d1c548..b6c29f8c60 100644
--- a/include/configs/sifive-unleashed.h
+++ b/include/configs/sifive-unleashed.h
@@ -75,6 +75,7 @@ 
 	"type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \
 	"type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
 	"partitions=" PARTS_DEFAULT "\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	BOOTENV \
 	BOOTENV_SF
 
diff --git a/include/configs/sifive-unmatched.h b/include/configs/sifive-unmatched.h
index 4fad69bb19..80cfd41ceb 100644
--- a/include/configs/sifive-unmatched.h
+++ b/include/configs/sifive-unmatched.h
@@ -73,6 +73,7 @@ 
 	"type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \
 	"type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
 	"partitions=" PARTS_DEFAULT "\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
 	BOOTENV
 
 #define CONFIG_PREBOOT \