6 Commits

Author SHA1 Message Date
f879119605 Обновить platform/generic/cvitek_riscv.c 2026-02-11 02:19:45 +07:00
aedef73d12 Обновить platform/generic/cvitek_riscv.c 2026-02-11 01:41:03 +07:00
92ee61dae4 Обновить platform/generic/cvitek_riscv.c 2026-02-11 01:34:56 +07:00
sophgo-forum-service
6766e9cc96 opensbi: weekly rls 2025.01.24
daa470, [fix](opensbi): add rls_info.txt
b21a54, [test](opensbi): opensbi tailoring (time optimizing)
6ff231, [fix](str): fix riscv suspend section which do not use varivales and functions beyond syspend section.
2025-01-24 14:50:56 +08:00
sophgo-forum-service
3b045ae374 opensbi: weekly rls 2025.01.10
daa470, [fix](opensbi): add rls_info.txt
b21a54, [test](opensbi): opensbi tailoring (time optimizing)
6ff231, [fix](str): fix riscv suspend section which do not use varivales and functions beyond syspend section.

Change-Id: I8c6e7698b475b2d14c02308121f621dafe9b9e36
2025-01-13 16:32:03 +08:00
sophgo-forum-service
fffb4754ee opensbi: weekly rls 2024.10.14
-0f5edb, [fix](str):fix chip id miss and fix suspend bug on rtc
-a068cd, [fix](str): refine rtc suspend/resume process

Change-Id: Ice28701d616192d7d6a6f13621d739dd07424571
2024-10-14 19:27:45 +08:00
7 changed files with 31 additions and 21 deletions

View File

@@ -1,16 +0,0 @@
AlignConsecutiveAssignments: true
AlignEscapedNewlines: Left
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: None
BraceWrapping:
AfterFunction: true
BreakBeforeBraces: Custom
BreakStringLiterals: false
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
IndentWidth: 8
ReflowComments: false
SortIncludes: false
SpacesInContainerLiterals: false
TabWidth: 8
UseTab: Always

View File

@@ -217,6 +217,14 @@ GENFLAGS += $(libsbiutils-genflags-y)
GENFLAGS += $(platform-genflags-y)
GENFLAGS += $(firmware-genflags-y)
define add_define
GENFLAGS += -D$(1)$(if $(value $(1)),=$(value $(1)),)
endef
ifeq (${CONFIG_OPENSBI_FASTBOOT},y)
$(eval $(call add_define,CONFIG_OPENSBI_FASTBOOT))
endif
CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-strict-aliasing -O2
CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
CFLAGS += -mno-save-restore -mstrict-align

View File

@@ -225,7 +225,9 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
{
int rc;
unsigned long *init_count;
#ifndef CONFIG_OPENSBI_FASTBOOT
const struct sbi_platform *plat = sbi_platform_ptr(scratch);
#endif
/* Note: This has to be first thing in coldboot init sequence */
rc = sbi_scratch_init(scratch);
@@ -246,20 +248,25 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
if (rc)
sbi_hart_hang();
#ifndef CONFIG_OPENSBI_FASTBOOT
rc = sbi_platform_early_init(plat, TRUE);
if (rc)
sbi_hart_hang();
#endif
rc = sbi_hart_init(scratch, TRUE);
if (rc)
sbi_hart_hang();
#ifndef CONFIG_OPENSBI_FASTBOOT
rc = sbi_console_init(scratch);
if (rc)
sbi_hart_hang();
#endif
sbi_boot_print_banner(scratch);
#ifndef CONFIG_OPENSBI_FASTBOOT
rc = sbi_platform_irqchip_init(plat, TRUE);
if (rc) {
sbi_printf("%s: platform irqchip init failed (error %d)\n",
@@ -272,6 +279,7 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
sbi_printf("%s: ipi init failed (error %d)\n", __func__, rc);
sbi_hart_hang();
}
#endif
rc = sbi_tlb_init(scratch, TRUE);
if (rc) {
@@ -319,12 +327,14 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
* Note: Platform final initialization should be last so that
* it sees correct domain assignment and PMP configuration.
*/
#ifndef CONFIG_OPENSBI_FASTBOOT
rc = sbi_platform_final_init(plat, TRUE);
if (rc) {
sbi_printf("%s: platform final init failed (error %d)\n",
__func__, rc);
sbi_hart_hang();
}
#endif
sbi_boot_print_hart(scratch, hartid);

View File

@@ -15,7 +15,9 @@
#define CLINT_TIMER_MAX_NR 16
static unsigned long clint_timer_count = 0;
static struct clint_data clint_timer[CLINT_TIMER_MAX_NR];
static struct clint_data clint_timer[CLINT_TIMER_MAX_NR] = {
{.addr = 0x74000000, .first_hartid = 0, .hart_count = 1, .has_64bit_mmio = 0, },
};
static int timer_clint_cold_init(void *fdt, int nodeoff,
const struct fdt_match *match)
@@ -29,9 +31,11 @@ static int timer_clint_cold_init(void *fdt, int nodeoff,
if (1 < clint_timer_count)
ctmaster = &clint_timer[0];
rc = fdt_parse_clint_node(fdt, nodeoff, TRUE, ct);
if (rc)
return rc;
if (clint_timer_count != 1) {
rc = fdt_parse_clint_node(fdt, nodeoff, TRUE, ct);
if (rc)
return rc;
}
return clint_cold_timer_init(ct, ctmaster);
}

View File

@@ -37,6 +37,9 @@ __asm__(".section .rodata\n"
#ifdef CONFIG_CV181X
#define SUSPEND_SRAM_ENTRY 0xC030000
#endif
#define SUSPEND_SRAM_ENTRY 0xC030000
#define memcpy sbi_memcpy
static void rtc_latch_pinmux_settings(void)
@@ -98,7 +101,8 @@ static int cvitek_riscv_early_init(bool cold_boot, const struct fdt_match *match
static const struct fdt_match cvitek_riscv_match[] = {
{ .compatible = "cvitek,cv180x" },
{ .compatible = "cvitek,cv181x" }
{ .compatible = "cvitek,cv181x" },
{ .compatible = "cvitek,sg200x" }
};
const struct platform_override cvitek_riscv = {

Binary file not shown.

Binary file not shown.