Skip to content

Commit

Permalink
Add k230 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
kendryte747 committed Aug 1, 2024
1 parent d045dcd commit dba032e
Show file tree
Hide file tree
Showing 85 changed files with 243,263 additions and 262 deletions.
16 changes: 16 additions & 0 deletions arch/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ config TARGET_SIPEED_MAIX
config TARGET_OPENPITON_RISCV64
bool "Support RISC-V cores on OpenPiton SoC"

config TARGET_K230_CANMV
bool "Support k230_CANMV(K230PI)"
select SYS_CACHE_SHIFT_6

config TARGET_K230_CANMV_01STUDIO
bool "Support k230_CANMV(01STUDIO)"
select SYS_CACHE_SHIFT_6

config TARGET_K230D_CANMV_BPI_ZERO
bool "Support k230D_CANMV(BPI-ZERO)"
select SYS_CACHE_SHIFT_6

endchoice

config SYS_ICACHE_OFF
Expand Down Expand Up @@ -65,12 +77,16 @@ source "board/sifive/unleashed/Kconfig"
source "board/sifive/unmatched/Kconfig"
source "board/openpiton/riscv64/Kconfig"
source "board/sipeed/maix/Kconfig"
source "board/kendryte/k230_canmv/Kconfig"
source "board/kendryte/k230_canmv_01studio/Kconfig"
source "board/kendryte/k230d_canmv_bpi_zero/Kconfig"

# platform-specific options below
source "arch/riscv/cpu/ax25/Kconfig"
source "arch/riscv/cpu/fu540/Kconfig"
source "arch/riscv/cpu/fu740/Kconfig"
source "arch/riscv/cpu/generic/Kconfig"
source "arch/riscv/cpu/k230/Kconfig"

# architecture-specific options below

Expand Down
18 changes: 18 additions & 0 deletions arch/riscv/cpu/k230/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# Copyright (C) 2017-2020 Alibaba Group Holding Limited
#
# SPDX-License-Identifier: GPL-2.0+
#

config KENDRYTE_K230
bool
select ARCH_EARLY_INIT_R
select SUPPORT_SPL
imply CPU
imply CPU_RISCV
imply RISCV_TIMER
imply RISCV_RDTIME
imply CMD_CPU
imply SPL_CPU
imply SPL_OPENSBI
imply SPL_LOAD_FIT
28 changes: 28 additions & 0 deletions arch/riscv/cpu/k230/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# /* Copyright (c) 2023, Canaan Bright Sight Co., Ltd
# *
# * Redistribution and use in source and binary forms, with or without
# * modification, are permitted provided that the following conditions are met:
# * 1. Redistributions of source code must retain the above copyright
# * notice, this list of conditions and the following disclaimer.
# * 2. Redistributions in binary form must reproduce the above copyright
# * notice, this list of conditions and the following disclaimer in the
# * documentation and/or other materials provided with the distribution.
# *
# * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
# * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# */

obj-y += dram.o
obj-y += cpu.o
obj-y += cache.o
Loading

0 comments on commit dba032e

Please sign in to comment.