Skip to content

Commit 964f09e

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

26 files changed

+28
-173
lines changed

drivers/clock_control/clock_control_wch_rcc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static void clock_control_wch_rcc_setup_flash(void)
9090
} else {
9191
latency = FLASH_ACTLR_LATENCY_1;
9292
}
93-
#elif defined(CONFIG_SOC_SERIES_CH32V00X)
93+
#elif defined(CONFIG_SOC_SERIES_QINGKE_V2A)
9494
if (WCH_RCC_SYSCLK <= 15000000) {
9595
latency = FLASH_ACTLR_LATENCY_0;
9696
} else if (WCH_RCC_SYSCLK <= 24000000) {

drivers/timer/Kconfig.wch_ch32v00x

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
config CH32V00X_SYSTICK
55
bool "CH32V QingKe core systick timer"
6-
depends on SOC_SERIES_QINGKE_V2A || SOC_SERIES_QINGKE_V4C || SOC_SERIES_CH32V00X
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

0 commit comments

Comments
 (0)