mirror of
https://github.com/Fishwaldo/meta-riscv.git
synced 2025-03-15 19:41:42 +00:00
u-boot: Drop patches for ae350-ax45mp
ae350-ax45mp was using U-boot v2022.07 with the applied patches: - (f4512618caa0) riscv: ae350: Fix XIP config boot failure - (aa0eda17cf98) spl: opensbi: convert scratch options to config Since OE-Core U-boot has upgraded to v2022.10 which includes both patches so we can drop them. Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
This commit is contained in:
parent
d5628ffd5a
commit
82318d6161
4 changed files with 1 additions and 142 deletions
|
@ -1,79 +0,0 @@
|
|||
From 04a7e1acebdd4bb348866e8aca6beddfb4b38b0c Mon Sep 17 00:00:00 2001
|
||||
From: Leo Yu-Chi Liang <ycliang@andestech.com>
|
||||
Date: Wed, 1 Jun 2022 10:01:49 +0800
|
||||
Subject: [PATCH] riscv: ae350: Fix XIP config boot failure
|
||||
|
||||
The booting flow is SPL -> OpenSBI -> U-Boot.
|
||||
The boot hart may change after OpenSBI and may not always be hart0,
|
||||
so wrap the related branch instruction with M-MODE.
|
||||
|
||||
Current DTB setup for XIP is not valid.
|
||||
There is no chance for CONFIG_SYS_FDT_BASE, the DTB address used
|
||||
in XIP mode, to be returned. Fix this.
|
||||
|
||||
Fixes: 2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards")
|
||||
Signed-off-by: Rick Chen <rick@andestech.com>
|
||||
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
|
||||
|
||||
The patch was imported from the U-boot git server
|
||||
(git://git.denx.de/u-boot.git) as of commit id
|
||||
f4512618caa0182344aa55c5e15b2a14e28227cd.
|
||||
|
||||
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
|
||||
---
|
||||
arch/riscv/cpu/start.S | 3 ++-
|
||||
board/AndesTech/ax25-ae350/ax25-ae350.c | 17 +++++++++++------
|
||||
2 files changed, 13 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S
|
||||
index 76850ec9be..41c6f0858e 100644
|
||||
--- a/arch/riscv/cpu/start.S
|
||||
+++ b/arch/riscv/cpu/start.S
|
||||
@@ -139,9 +139,10 @@ call_harts_early_init:
|
||||
* accesses gd).
|
||||
*/
|
||||
mv gp, s0
|
||||
+#if CONFIG_IS_ENABLED(RISCV_MMODE)
|
||||
bnez tp, secondary_hart_loop
|
||||
#endif
|
||||
-
|
||||
+#endif
|
||||
jal board_init_f_init_reserve
|
||||
|
||||
SREG s1, GD_FIRMWARE_FDT_ADDR(gp)
|
||||
diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
|
||||
index d6a4291379..36f0dd4b0f 100644
|
||||
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
|
||||
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
|
||||
@@ -54,17 +54,22 @@ ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#define ANDES_HW_DTB_ADDRESS 0xF2000000
|
||||
void *board_fdt_blob_setup(int *err)
|
||||
{
|
||||
*err = 0;
|
||||
-#if defined(CONFIG_OF_BOARD)
|
||||
- return (void *)(ulong)gd->arch.firmware_fdt_addr;
|
||||
-#elif defined(CONFIG_OF_SEPARATE)
|
||||
- return (void *)CONFIG_SYS_FDT_BASE;
|
||||
-#else
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_OF_SEPARATE) || IS_ENABLED(CONFIG_OF_BOARD)) {
|
||||
+ if (gd->arch.firmware_fdt_addr)
|
||||
+ return (void *)(ulong)gd->arch.firmware_fdt_addr;
|
||||
+ }
|
||||
+
|
||||
+ if (fdt_magic(CONFIG_SYS_FDT_BASE) == FDT_MAGIC)
|
||||
+ return (void *)CONFIG_SYS_FDT_BASE;
|
||||
+ return (void *)ANDES_HW_DTB_ADDRESS;
|
||||
+
|
||||
*err = -EINVAL;
|
||||
return NULL;
|
||||
-#endif
|
||||
}
|
||||
|
||||
int smc_init(void)
|
||||
--
|
||||
2.34.1
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
From fff9a49908aaaf4a443160d2bdcb1c3ff17e2e5f Mon Sep 17 00:00:00 2001
|
||||
From: Nikita Shubin <n.shubin@yadro.com>
|
||||
Date: Wed, 10 Aug 2022 17:06:50 +0800
|
||||
Subject: [PATCH] spl: opensbi: convert scratch options to config
|
||||
|
||||
Convert hardcoded "opensbi_info.options" to config provided value, this
|
||||
allows changing options passed to OpenSBI.
|
||||
|
||||
SPL_OPENSBI_SCRATCH_OPTIONS is defaulted to SBI_SCRATCH_NO_BOOT_PRINTS.
|
||||
|
||||
Link: https://github.com/riscv-software-src/opensbi/blob/master/docs/firmware/fw_dynamic.md
|
||||
Signed-off-by: Nikita Shubin <n.shubin@yadro.com>
|
||||
Reviewed-by: Anup Patel <anup@brainfault.org>
|
||||
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
|
||||
|
||||
The patch was imported from the U-boot git server
|
||||
(git://git.denx.de/u-boot.git) as of commit id
|
||||
aa0eda17cf98448c3ef826204f38c76bf48b3345.
|
||||
|
||||
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
|
||||
---
|
||||
common/spl/Kconfig | 8 ++++++++
|
||||
common/spl/spl_opensbi.c | 2 +-
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
|
||||
index 50ff113cab..ddab5650e6 100644
|
||||
--- a/common/spl/Kconfig
|
||||
+++ b/common/spl/Kconfig
|
||||
@@ -1339,6 +1339,14 @@ config SPL_OPENSBI_LOAD_ADDR
|
||||
help
|
||||
Load address of the OpenSBI binary.
|
||||
|
||||
+config SPL_OPENSBI_SCRATCH_OPTIONS
|
||||
+ hex "Scratch options passed to OpenSBI"
|
||||
+ default 0x1
|
||||
+ depends on SPL_OPENSBI
|
||||
+ help
|
||||
+ Options passed to fw_dynamic, for example SBI_SCRATCH_NO_BOOT_PRINTS or
|
||||
+ SBI_SCRATCH_DEBUG_PRINTS.
|
||||
+
|
||||
config TPL
|
||||
bool
|
||||
depends on SUPPORT_TPL
|
||||
diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c
|
||||
index 1c0abf8553..1f76f7fa1b 100644
|
||||
--- a/common/spl/spl_opensbi.c
|
||||
+++ b/common/spl/spl_opensbi.c
|
||||
@@ -71,7 +71,7 @@ void spl_invoke_opensbi(struct spl_image_info *spl_image)
|
||||
opensbi_info.version = FW_DYNAMIC_INFO_VERSION;
|
||||
opensbi_info.next_addr = uboot_entry;
|
||||
opensbi_info.next_mode = FW_DYNAMIC_INFO_NEXT_MODE_S;
|
||||
- opensbi_info.options = SBI_SCRATCH_NO_BOOT_PRINTS;
|
||||
+ opensbi_info.options = CONFIG_SPL_OPENSBI_SCRATCH_OPTIONS;
|
||||
opensbi_info.boot_hart = gd->arch.boot_hart;
|
||||
|
||||
opensbi_entry = (void (*)(ulong, ulong, ulong))spl_image->entry_point;
|
||||
--
|
||||
2.34.1
|
||||
|
|
@ -9,9 +9,7 @@ SRC_URI:append:freedom-u540_sota = " file://uEnv.txt"
|
|||
DEPENDS:append = " u-boot-tools-native"
|
||||
|
||||
SRC_URI:append:ae350-ax45mp = " \
|
||||
file://0001-riscv-ae350-Fix-XIP-config-boot-failure.patch \
|
||||
file://0002-mmc-ftsdc010_mci-Support-DTS-of-ftsdc010-driver-for-.patch \
|
||||
file://0003-spl-opensbi-convert-scratch-options-to-config.patch \
|
||||
file://0001-mmc-ftsdc010_mci-Support-DTS-of-ftsdc010-driver-for-.patch \
|
||||
file://mmc-support.cfg \
|
||||
file://opensbi-options.cfg \
|
||||
file://tftp-mmc-boot.txt \
|
||||
|
|
Loading…
Add table
Reference in a new issue