forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'riscv-for-linus-5.7' of git://git.kernel.org/pub/scm/linux…
…/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: "This contains a handful of new features: - Partial support for the Kendryte K210. There are still a few outstanding issues that I have patches for, but I don't actually have a board to test them so they're not included yet. - SBI v0.2 support. - Fixes to support for building with LLVM-based toolchains. The resulting images are known not to boot yet. I don't anticipate a part two, but I'll probably have something early in the RCs to finish up the K210 support" * tag 'riscv-for-linus-5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (38 commits) riscv: create a loader.bin boot image for Kendryte SoC riscv: Kendryte K210 default config riscv: Add Kendryte K210 device tree riscv: Select required drivers for Kendryte SOC riscv: Add Kendryte K210 SoC support riscv: Add SOC early init support riscv: Unaligned load/store handling for M_MODE RISC-V: Support cpu hotplug RISC-V: Add supported for ordered booting method using HSM RISC-V: Add SBI HSM extension definitions RISC-V: Export SBI error to linux error mapping function RISC-V: Add cpu_ops and modify default booting method RISC-V: Move relocate and few other functions out of __init RISC-V: Implement new SBI v0.2 extensions RISC-V: Introduce a new config for SBI v0.1 RISC-V: Add SBI v0.2 extension definitions RISC-V: Add basic support for SBI v0.2 RISC-V: Mark existing SBI as 0.1 SBI. riscv: Use macro definition instead of magic number riscv: Add support to dump the kernel page tables ...
- Loading branch information
Showing
54 changed files
with
3,093 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
subdir-y += sifive | ||
subdir-y += kendryte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
dtb-$(CONFIG_SOC_KENDRYTE) += k210.dtb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
/* | ||
* Copyright (C) 2020 Western Digital Corporation or its affiliates. | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#include "k210.dtsi" | ||
|
||
/ { | ||
model = "Kendryte K210 generic"; | ||
compatible = "kendryte,k210"; | ||
|
||
chosen { | ||
bootargs = "earlycon console=ttySIF0"; | ||
stdout-path = "serial0"; | ||
}; | ||
}; | ||
|
||
&uarths0 { | ||
status = "okay"; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
// SPDX-License-Identifier: GPL-2.0+ | ||
/* | ||
* Copyright (C) 2019 Sean Anderson <[email protected]> | ||
* Copyright (C) 2020 Western Digital Corporation or its affiliates. | ||
*/ | ||
#include <dt-bindings/clock/k210-clk.h> | ||
|
||
/ { | ||
/* | ||
* Although the K210 is a 64-bit CPU, the address bus is only 32-bits | ||
* wide, and the upper half of all addresses is ignored. | ||
*/ | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
compatible = "kendryte,k210"; | ||
|
||
aliases { | ||
serial0 = &uarths0; | ||
}; | ||
|
||
/* | ||
* The K210 has an sv39 MMU following the priviledge specification v1.9. | ||
* Since this is a non-ratified draft specification, the kernel does not | ||
* support it and the K210 support enabled only for the !MMU case. | ||
* Be consistent with this by setting the CPUs MMU type to "none". | ||
*/ | ||
cpus { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
timebase-frequency = <7800000>; | ||
cpu0: cpu@0 { | ||
device_type = "cpu"; | ||
reg = <0>; | ||
compatible = "kendryte,k210", "sifive,rocket0", "riscv"; | ||
riscv,isa = "rv64imafdc"; | ||
mmu-type = "none"; | ||
i-cache-size = <0x8000>; | ||
i-cache-block-size = <64>; | ||
d-cache-size = <0x8000>; | ||
d-cache-block-size = <64>; | ||
clocks = <&sysctl K210_CLK_CPU>; | ||
clock-frequency = <390000000>; | ||
cpu0_intc: interrupt-controller { | ||
#interrupt-cells = <1>; | ||
interrupt-controller; | ||
compatible = "riscv,cpu-intc"; | ||
}; | ||
}; | ||
cpu1: cpu@1 { | ||
device_type = "cpu"; | ||
reg = <1>; | ||
compatible = "kendryte,k210", "sifive,rocket0", "riscv"; | ||
riscv,isa = "rv64imafdc"; | ||
mmu-type = "none"; | ||
i-cache-size = <0x8000>; | ||
i-cache-block-size = <64>; | ||
d-cache-size = <0x8000>; | ||
d-cache-block-size = <64>; | ||
clocks = <&sysctl K210_CLK_CPU>; | ||
clock-frequency = <390000000>; | ||
cpu1_intc: interrupt-controller { | ||
#interrupt-cells = <1>; | ||
interrupt-controller; | ||
compatible = "riscv,cpu-intc"; | ||
}; | ||
}; | ||
}; | ||
|
||
sram: memory@80000000 { | ||
device_type = "memory"; | ||
reg = <0x80000000 0x400000>, | ||
<0x80400000 0x200000>, | ||
<0x80600000 0x200000>; | ||
reg-names = "sram0", "sram1", "aisram"; | ||
}; | ||
|
||
clocks { | ||
in0: oscillator { | ||
compatible = "fixed-clock"; | ||
#clock-cells = <0>; | ||
clock-frequency = <26000000>; | ||
}; | ||
}; | ||
|
||
soc { | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
compatible = "kendryte,k210-soc", "simple-bus"; | ||
ranges; | ||
interrupt-parent = <&plic0>; | ||
|
||
sysctl: sysctl@50440000 { | ||
compatible = "kendryte,k210-sysctl", "simple-mfd"; | ||
reg = <0x50440000 0x1000>; | ||
#clock-cells = <1>; | ||
}; | ||
|
||
clint0: interrupt-controller@2000000 { | ||
compatible = "riscv,clint0"; | ||
reg = <0x2000000 0xC000>; | ||
interrupts-extended = <&cpu0_intc 3>, <&cpu1_intc 3>; | ||
clocks = <&sysctl K210_CLK_ACLK>; | ||
}; | ||
|
||
plic0: interrupt-controller@c000000 { | ||
#interrupt-cells = <1>; | ||
interrupt-controller; | ||
compatible = "kendryte,k210-plic0", "riscv,plic0"; | ||
reg = <0xC000000 0x4000000>; | ||
interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 0xffffffff>, | ||
<&cpu1_intc 11>, <&cpu1_intc 0xffffffff>; | ||
riscv,ndev = <65>; | ||
riscv,max-priority = <7>; | ||
}; | ||
|
||
uarths0: serial@38000000 { | ||
compatible = "kendryte,k210-uarths", "sifive,uart0"; | ||
reg = <0x38000000 0x1000>; | ||
interrupts = <33>; | ||
clocks = <&sysctl K210_CLK_CPU>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# CONFIG_CPU_ISOLATION is not set | ||
CONFIG_LOG_BUF_SHIFT=15 | ||
CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=12 | ||
CONFIG_BLK_DEV_INITRD=y | ||
CONFIG_INITRAMFS_SOURCE="" | ||
CONFIG_INITRAMFS_FORCE=y | ||
# CONFIG_RD_BZIP2 is not set | ||
# CONFIG_RD_LZMA is not set | ||
# CONFIG_RD_XZ is not set | ||
# CONFIG_RD_LZO is not set | ||
# CONFIG_RD_LZ4 is not set | ||
# CONFIG_BOOT_CONFIG is not set | ||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
# CONFIG_SYSFS_SYSCALL is not set | ||
# CONFIG_FHANDLE is not set | ||
# CONFIG_BASE_FULL is not set | ||
# CONFIG_EPOLL is not set | ||
# CONFIG_SIGNALFD is not set | ||
# CONFIG_TIMERFD is not set | ||
# CONFIG_EVENTFD is not set | ||
# CONFIG_AIO is not set | ||
# CONFIG_IO_URING is not set | ||
# CONFIG_ADVISE_SYSCALLS is not set | ||
# CONFIG_MEMBARRIER is not set | ||
# CONFIG_KALLSYMS is not set | ||
CONFIG_EMBEDDED=y | ||
# CONFIG_VM_EVENT_COUNTERS is not set | ||
# CONFIG_COMPAT_BRK is not set | ||
CONFIG_SLOB=y | ||
# CONFIG_SLAB_MERGE_DEFAULT is not set | ||
# CONFIG_MMU is not set | ||
CONFIG_SOC_KENDRYTE=y | ||
CONFIG_MAXPHYSMEM_2GB=y | ||
CONFIG_SMP=y | ||
CONFIG_NR_CPUS=2 | ||
CONFIG_CMDLINE="earlycon console=ttySIF0" | ||
CONFIG_CMDLINE_FORCE=y | ||
CONFIG_USE_BUILTIN_DTB=y | ||
CONFIG_BUILTIN_DTB_SOURCE="kendryte/k210" | ||
# CONFIG_BLOCK is not set | ||
CONFIG_BINFMT_FLAT=y | ||
# CONFIG_COREDUMP is not set | ||
CONFIG_DEVTMPFS=y | ||
CONFIG_DEVTMPFS_MOUNT=y | ||
# CONFIG_FW_LOADER is not set | ||
# CONFIG_ALLOW_DEV_COREDUMP is not set | ||
# CONFIG_INPUT_KEYBOARD is not set | ||
# CONFIG_INPUT_MOUSE is not set | ||
# CONFIG_SERIO is not set | ||
# CONFIG_LEGACY_PTYS is not set | ||
# CONFIG_LDISC_AUTOLOAD is not set | ||
# CONFIG_DEVMEM is not set | ||
# CONFIG_HW_RANDOM is not set | ||
# CONFIG_HWMON is not set | ||
# CONFIG_VGA_CONSOLE is not set | ||
# CONFIG_HID is not set | ||
# CONFIG_USB_SUPPORT is not set | ||
# CONFIG_VIRTIO_MENU is not set | ||
# CONFIG_DNOTIFY is not set | ||
# CONFIG_INOTIFY_USER is not set | ||
# CONFIG_MISC_FILESYSTEMS is not set | ||
CONFIG_LSM="[]" | ||
CONFIG_PRINTK_TIME=y | ||
# CONFIG_DEBUG_MISC is not set | ||
# CONFIG_SCHED_DEBUG is not set | ||
# CONFIG_RCU_TRACE is not set | ||
# CONFIG_FTRACE is not set | ||
# CONFIG_RUNTIME_TESTING_MENU is not set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.