riscv: cpu: cv1800b: Add support for cv1800b SoC
Add Sophgo cv1800b SoC to support RISC-V arch. Signed-off-by: Kongyang Liu <seashell11234455@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
This commit is contained in:

committed by
Leo Yu-Chi Liang

parent
e4f69492ad
commit
ae800aa79a
@@ -93,6 +93,7 @@ source "board/xilinx/mbv/Kconfig"
|
|||||||
|
|
||||||
# platform-specific options below
|
# platform-specific options below
|
||||||
source "arch/riscv/cpu/andesv5/Kconfig"
|
source "arch/riscv/cpu/andesv5/Kconfig"
|
||||||
|
source "arch/riscv/cpu/cv1800b/Kconfig"
|
||||||
source "arch/riscv/cpu/fu540/Kconfig"
|
source "arch/riscv/cpu/fu540/Kconfig"
|
||||||
source "arch/riscv/cpu/fu740/Kconfig"
|
source "arch/riscv/cpu/fu740/Kconfig"
|
||||||
source "arch/riscv/cpu/generic/Kconfig"
|
source "arch/riscv/cpu/generic/Kconfig"
|
||||||
|
12
arch/riscv/cpu/cv1800b/Kconfig
Normal file
12
arch/riscv/cpu/cv1800b/Kconfig
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024, Kongyang Liu <seashell11234455@gmail.com>
|
||||||
|
|
||||||
|
config SOPHGO_CV1800B
|
||||||
|
bool
|
||||||
|
select ARCH_EARLY_INIT_R
|
||||||
|
select SYS_CACHE_SHIFT_6
|
||||||
|
imply CPU
|
||||||
|
imply CPU_RISCV
|
||||||
|
imply RISCV_TIMER
|
||||||
|
imply CMD_CPU
|
6
arch/riscv/cpu/cv1800b/Makefile
Normal file
6
arch/riscv/cpu/cv1800b/Makefile
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024, Kongyang Liu <seashell11234455@gmail.com>
|
||||||
|
|
||||||
|
obj-y += dram.o
|
||||||
|
obj-y += cpu.o
|
9
arch/riscv/cpu/cv1800b/cpu.c
Normal file
9
arch/riscv/cpu/cv1800b/cpu.c
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0+
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024, Kongyang Liu <seashell11234455@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
int cleanup_before_linux(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
21
arch/riscv/cpu/cv1800b/dram.c
Normal file
21
arch/riscv/cpu/cv1800b/dram.c
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0+
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <fdtdec.h>
|
||||||
|
#include <init.h>
|
||||||
|
#include <asm/global_data.h>
|
||||||
|
#include <linux/sizes.h>
|
||||||
|
|
||||||
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
|
|
||||||
|
int dram_init(void)
|
||||||
|
{
|
||||||
|
return fdtdec_setup_mem_size_base();
|
||||||
|
}
|
||||||
|
|
||||||
|
int dram_init_banksize(void)
|
||||||
|
{
|
||||||
|
return fdtdec_setup_memory_banksize();
|
||||||
|
}
|
@@ -7,7 +7,7 @@ config SYS_VENDOR
|
|||||||
default "sophgo"
|
default "sophgo"
|
||||||
|
|
||||||
config SYS_CPU
|
config SYS_CPU
|
||||||
default "generic"
|
default "cv1800b"
|
||||||
|
|
||||||
config SYS_CONFIG_NAME
|
config SYS_CONFIG_NAME
|
||||||
default "milkv_duo"
|
default "milkv_duo"
|
||||||
@@ -23,6 +23,6 @@ config ENV_SECT_SIZE
|
|||||||
|
|
||||||
config BOARD_SPECIFIC_OPTIONS
|
config BOARD_SPECIFIC_OPTIONS
|
||||||
def_bool y
|
def_bool y
|
||||||
select GENERIC_RISCV
|
select SOPHGO_CV1800B
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user