Skip to content

Commit 2f053f0

Browse files
committed
soc: riscv: rv32m1: Create basic RV32M1 SOC config
Add new SOC_OPENISA_RV32M1 kconfig symbol to allow having options common to both the RISCV and ARM cores. Signed-off-by: Karsten Koenig <[email protected]>
1 parent 9f8d745 commit 2f053f0

File tree

16 files changed

+24
-18
lines changed

16 files changed

+24
-18
lines changed

arch/common/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ zephyr_linker_sources_ifdef(CONFIG_NOCACHE_MEMORY
3636

3737
# Only ARM, X86 and OPENISA_RV32M1_RISCV32 use ROM_START_OFFSET.
3838
if (DEFINED CONFIG_ARM OR DEFINED CONFIG_X86
39-
OR DEFINED CONFIG_SOC_OPENISA_RV32M1_RISCV32)
39+
OR DEFINED CONFIG_SOC_OPENISA_RV32M1)
4040
zephyr_linker_sources(ROM_START SORT_KEY 0x0 rom_start_offset.ld)
4141
endif()

drivers/clock_control/Kconfig.rv32m1

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

66
config CLOCK_CONTROL_RV32M1_PCC
77
bool "RV32M1 PCC driver"
8-
depends on SOC_OPENISA_RV32M1_RISCV32
8+
depends on SOC_OPENISA_RV32M1
99
help
1010
Enable support for RV32M1 PCC driver.

drivers/entropy/Kconfig.rv32m1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
config ENTROPY_RV32M1_TRNG
77
bool "RV32M1 TRNG driver"
8-
depends on SOC_OPENISA_RV32M1_RISCV32
8+
depends on SOC_OPENISA_RV32M1
99
select ENTROPY_HAS_DRIVER
1010
help
1111
This option enables the true random number generator (TRNG)

drivers/gpio/Kconfig.rv32m1

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

66
config GPIO_RV32M1
77
bool "RV32M1 GPIO driver"
8-
depends on SOC_OPENISA_RV32M1_RISCV32
8+
depends on SOC_OPENISA_RV32M1
99
help
1010
Enable the RV32M1 GPIO driver.

drivers/interrupt_controller/Kconfig.rv32m1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
config RV32M1_INTMUX
77
bool "OpenISA RV32M1 INTMUX interrupt controller support"
8-
depends on SOC_OPENISA_RV32M1_RISCV32 && MULTI_LEVEL_INTERRUPTS
8+
depends on SOC_OPENISA_RV32M1 && MULTI_LEVEL_INTERRUPTS
99
help
1010
Select this option to enable support for the RV32M1 INTMUX
1111
driver. This provides a level 2 interrupt controller for the SoC.

drivers/pinmux/Kconfig.rv32m1

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

66
config PINMUX_RV32M1
77
bool "RV32M1 pinmux driver"
8-
depends on SOC_OPENISA_RV32M1_RISCV32
8+
depends on SOC_OPENISA_RV32M1
99
help
1010
Enable the RV32M1 pinmux driver.

drivers/pinmux/pinmux_rv32m1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <errno.h>
1111
#include <device.h>
1212
#include <drivers/pinmux.h>
13+
#include <soc.h>
1314

1415
#include <fsl_common.h>
1516
#include <fsl_clock.h>

drivers/timer/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,8 @@ config RISCV_MACHINE_TIMER
161161
config RV32M1_LPTMR_TIMER
162162
bool "RV32M1 LPTMR system timer driver"
163163
default y
164-
depends on SOC_OPENISA_RV32M1_RISCV32
164+
depends on SOC_OPENISA_RV32M1
165165
depends on !TICKLESS_IDLE
166-
depends on RV32M1_INTMUX
167166
help
168167
This module implements a kernel device driver for using the LPTMR
169168
peripheral as the system clock. It provides the standard "system clock

modules/Kconfig.vega

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# Copyright (c) 2018 Foundries.io
22
# SPDX-License-Identifier: Apache-2.0
33

4+
config SOC_OPENISA_RV32M1
5+
bool "OpenISA RV32M1 core"
6+
help
7+
Basic OpenISA RV32M1 support.
8+
49
config VEGA_SDK_HAL
510
bool "RV32M1 VEGA SDK support"
6-
depends on SOC_OPENISA_RV32M1_RISCV32
11+
depends on SOC_OPENISA_RV32M1
712

813
config HAS_RV32M1_LPUART
914
bool

soc/riscv/openisa_rv32m1/Kconfig.soc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config SOC_OPENISA_RV32M1_RISCV32
77
# The following select is due to limitations in the linker script.
88
# (We can't make it a 'depends on' without causing a dependency loop).
99
select XIP
10+
select SOC_OPENISA_RV32M1
1011
select HAS_RV32M1_LPUART
1112
select HAS_RV32M1_LPI2C
1213
select HAS_RV32M1_LPSPI

0 commit comments

Comments
 (0)