* riscv: lib: improve extension detection
* riscv: sbi: fix display format and global variable storage
* sifive: fu740: reduce DDR speed
* board: starfive vf2: switch to standard boot and fix DTS
This commit is contained in:
Tom Rini 2024-03-12 09:53:06 -04:00
commit 7422f661e2
9 changed files with 29 additions and 25 deletions

View file

@ -49,14 +49,24 @@ static inline bool supports_extension(char ext)
}
if (!cpu_get_desc(dev, desc, sizeof(desc))) {
/*
* skip the first 4 characters (rv32|rv64) and
* check until underscore
* skip the first 4 characters (rv32|rv64)
*/
for (i = 4; i < sizeof(desc); i++) {
if (desc[i] == '_' || desc[i] == '\0')
break;
if (desc[i] == ext)
return true;
switch (desc[i]) {
case 's':
case 'x':
case 'z':
case '_':
case '\0':
/*
* Any of these characters mean the single
* letter extensions have all been consumed.
*/
return false;
default:
if (desc[i] == ext)
return true;
}
}
}

View file

@ -77,7 +77,7 @@
0x0 0x100b2000 0x0 0x2000
0x0 0x100b8000 0x0 0x1000>;
clocks = <&prci FU740_PRCI_CLK_DDRPLL>;
clock-frequency = <933333324>;
clock-frequency = <800000004>;
bootph-pre-ram;
};
};

View file

@ -112,6 +112,6 @@
u-boot-spl {
};
};
};
};
};

View file

@ -93,6 +93,10 @@
bootph-pre-ram;
};
&pllclk {
bootph-pre-ram;
};
&S7_0 {
status = "okay";
};

View file

@ -1,7 +1,8 @@
STARFIVE JH7110 VISIONFIVE2 BOARD
M: Yanhong Wang <yanhong.wang@starfivetech.com>
M: Minda Chen <minda.chen@starfivetech.com>
S: Maintained
F: arch/riscv/include/asm/arch-jh7110/
F: board/starfive/visionfive2/
F: include/configs/starfive-visionfive2.h
F: configs/starfive_visionfive2_defconfig
F: drivers/pci/pcie_starfive_jh7110.c

View file

@ -81,6 +81,7 @@ static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
break;
switch (impl_id) {
case 1: /* OpenSBI */
case 8: /* PolarFire Hart Software Services */
printf("%ld.%ld",
vers >> 16, vers & 0xffff);
break;
@ -99,7 +100,7 @@ static int do_sbi(struct cmd_tbl *cmdtp, int flag, int argc,
}
}
if (i == ARRAY_SIZE(implementations))
printf("Unknown implementation ID %ld", ret);
printf("\nUnknown implementation ID 0x%x", impl_id);
}
printf("\nMachine:\n");
ret = sbi_get_mvendorid(&mvendorid);

View file

@ -30,8 +30,8 @@ CONFIG_RISCV_SMODE=y
# CONFIG_OF_BOARD_FIXUP is not set
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_FIT=y
CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_DISTRO_DEFAULTS=y
CONFIG_BOOTSTAGE=y
CONFIG_QSPI_BOOT=y
CONFIG_SD_BOOT=y

View file

@ -17,7 +17,7 @@ static inline void _debug_uart_putc(int c)
#else
static int sbi_dbcn_available;
static int sbi_dbcn_available __section(".data");
static inline void _debug_uart_init(void)
{

View file

@ -15,17 +15,6 @@
#define __io
/* Environment options */
#define BOOT_TARGET_DEVICES(func) \
func(NVME, nvme, 0) \
func(USB, usb, 0) \
func(MMC, mmc, 0) \
func(MMC, mmc, 1) \
func(DHCP, dhcp, na)
#include <config_distro_bootcmd.h>
#define TYPE_GUID_SPL "2E54B353-1271-4842-806F-E436D6AF6985"
#define TYPE_GUID_UBOOT "BC13C2FF-59E6-4262-A352-B275FD6F7172"
#define TYPE_GUID_SYSTEM "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"
@ -48,7 +37,6 @@
"type_guid_gpt_loader2=" TYPE_GUID_UBOOT "\0" \
"type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \
"partitions=" PARTS_DEFAULT "\0" \
"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
BOOTENV
"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"
#endif /* _STARFIVE_VISIONFIVE2_H */