Compare commits
6 Commits
v4.1.6
...
sg200x-dev
| Author | SHA1 | Date | |
|---|---|---|---|
| f879119605 | |||
| aedef73d12 | |||
| 92ee61dae4 | |||
|
|
6766e9cc96 | ||
|
|
3b045ae374 | ||
|
|
fffb4754ee |
@@ -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
|
||||
8
Makefile
8
Makefile
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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.
Reference in New Issue
Block a user