Skip to content

Commit 6edb062

Browse files
gmarullcarlescufi
authored andcommitted
soc: riscv: gd32vf103: simplify MCAUSE exception mask handling
The exception mask needs to cover MCAUSE bits 11:0, there's no need to overengineer this setting using DT properties. Ref. https://doc.nucleisys.com/nuclei_spec/isa/core_csr.html#mcause Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent a364420 commit 6edb062

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

dts/bindings/cpu/nuclei,bumblebee.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,3 @@ description: Nuclei Bumblebee RISC-V Core
66
compatible: "nuclei,bumblebee"
77

88
include: riscv,cpus.yaml
9-
10-
properties:
11-
mcause-exception-mask:
12-
type: int
13-
required: true
14-
description: Specify the bits to use for exception code in mcause register.

dts/riscv/gd/gd32vf103.dtsi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
cpu: cpu@0 {
2525
clock-frequency = <DT_FREQ_M(108)>;
26-
mcause-exception-mask = <0x7ff>;
2726
compatible = "nuclei,bumblebee";
2827
riscv,isa = "rv32imac_zicsr_zifencei";
2928
reg = <0>;

soc/riscv/gd_gd32/gd32vf103/Kconfig.defconfig.gd32vf103

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
1515
default 27000000
1616

1717
config RISCV_SOC_MCAUSE_EXCEPTION_MASK
18-
default $(dt_node_int_prop_hex,/cpus/cpu@0,mcause-exception-mask)
18+
default 0xFFF
1919

2020
config RISCV_SOC_INTERRUPT_INIT
2121
default y

0 commit comments

Comments
 (0)