Skip to content

Commit 1e6a8b8

Browse files
committed
soc: wch: Reorganize Qingke V4 Socs for future
Reorganization for deduplication. Signed-off-by: Camille BAUD <mail@massdriver.space>
1 parent 3a962aa commit 1e6a8b8

25 files changed

+28
-173
lines changed

drivers/timer/Kconfig.wch_ch32v00x

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
config CH32V00X_SYSTICK
5-
bool "CH32V QingKe core systick timer"
6-
depends on SOC_SERIES_QINGKE_V2A || SOC_SERIES_QINGKE_V4C || SOC_SERIES_CH32V00X
5+
bool "CH32V00X systick timer"
6+
depends on SOC_SERIES_QINGKE_V2A || SOC_SERIES_QINGKE_V4
77
default y
88
depends on DT_HAS_WCH_SYSTICK_ENABLED

modules/hal_wch/ch32fun.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,14 @@
77
#ifndef _CH32FUN_H
88
#define _CH32FUN_H
99

10-
#if defined(CONFIG_SOC_CH32V003)
10+
#if defined(CONFIG_SOC_CH32V003) || defined(CONFIG_SOC_CH32V006)
1111
#define CH32V003 1
1212
#include <ch32v003fun.h>
1313
#endif
1414

15-
#if defined(CONFIG_SOC_SERIES_CH32V00X)
16-
#define CH32V003 1
17-
#include <ch32v003fun.h>
18-
#endif
19-
20-
#if defined(CONFIG_SOC_SERIES_QINGKE_V4C)
15+
#if defined(CONFIG_SOC_CH32V208)
2116
#define CH32V20x 1
17+
#define CH32V20x_D8W 1
2218
#include <ch32v003fun.h>
2319
#endif
2420

soc/wch/ch32v/ch32v00x/Kconfig

Lines changed: 0 additions & 9 deletions
This file was deleted.

soc/wch/ch32v/ch32v00x/Kconfig.defconfig

Lines changed: 0 additions & 14 deletions
This file was deleted.

soc/wch/ch32v/ch32v00x/Kconfig.soc

Lines changed: 0 additions & 11 deletions
This file was deleted.

soc/wch/ch32v/ch32v00x/soc_irq.S

Lines changed: 0 additions & 20 deletions
This file was deleted.

soc/wch/ch32v/ch32v00x/vector.S

Lines changed: 0 additions & 29 deletions
This file was deleted.

soc/wch/ch32v/qingke_v2a/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ config SOC_SERIES_QINGKE_V2A
66
select RISCV_ISA_EXT_ZICSR
77
select RISCV_ISA_EXT_ZIFENCEI
88
select RISCV_ISA_EXT_C
9+
select RISCV_ISA_EXT_ZMMUL

soc/wch/ch32v/qingke_v2a/Kconfig.defconfig

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
# Copyright (c) 2024 Michael Hope
1+
# Copyright (c) 2024-2025 Michael Hope
22
# SPDX-License-Identifier: Apache-2.0
33

44
if SOC_SERIES_QINGKE_V2A
55

66
config SYS_CLOCK_HW_CYCLES_PER_SEC
77
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)
88

9-
config MAIN_STACK_SIZE
10-
default 512
11-
12-
config IDLE_STACK_SIZE
13-
default 256
14-
15-
config ISR_STACK_SIZE
16-
default 256
17-
189
config CLOCK_CONTROL
1910
default y
2011

Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Copyright (c) 2025 Michael Hope <michaelh@juju.nz>
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if SOC_SERIES_CH32V00X
4+
if SOC_CH32V006
55

66
config VECTOR_TABLE_SIZE
77
default 41
88

99
config NUM_IRQS
1010
default 41
1111

12-
endif # SOC_SERIES_CH32V00X
12+
endif # SOC_CH32V006

0 commit comments

Comments
 (0)