2019-11-01 20:45:29 +08:00
|
|
|
# RV32M1 SoC RISC-V core default configuration values
|
|
|
|
|
2018-11-25 17:40:57 +08:00
|
|
|
# Copyright (c) 2018 Foundries.io Ltd
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2022-09-15 04:23:15 +08:00
|
|
|
if SOC_OPENISA_RV32M1
|
2018-11-25 17:40:57 +08:00
|
|
|
|
2018-11-25 17:41:38 +08:00
|
|
|
# 32 from event unit + 32 * (1 + max enabled INTMUX channel)
|
2018-11-25 17:40:57 +08:00
|
|
|
config NUM_IRQS
|
2018-11-25 17:41:38 +08:00
|
|
|
default 288 if RV32M1_INTMUX_CHANNEL_7
|
|
|
|
default 256 if RV32M1_INTMUX_CHANNEL_6
|
|
|
|
default 224 if RV32M1_INTMUX_CHANNEL_5
|
|
|
|
default 192 if RV32M1_INTMUX_CHANNEL_4
|
|
|
|
default 160 if RV32M1_INTMUX_CHANNEL_3
|
|
|
|
default 128 if RV32M1_INTMUX_CHANNEL_2
|
|
|
|
default 96 if RV32M1_INTMUX_CHANNEL_1
|
|
|
|
default 64 if RV32M1_INTMUX_CHANNEL_0
|
2018-11-25 17:40:57 +08:00
|
|
|
default 32
|
|
|
|
|
|
|
|
config RISCV_GENERIC_TOOLCHAIN
|
2019-02-01 22:28:31 +08:00
|
|
|
default y if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr"
|
2018-11-25 17:40:57 +08:00
|
|
|
default n
|
|
|
|
|
|
|
|
config RISCV_SOC_CONTEXT_SAVE
|
|
|
|
default y if SOC_OPENISA_RV32M1_RI5CY
|
|
|
|
|
2018-12-03 08:46:26 +08:00
|
|
|
config RISCV_SOC_OFFSETS
|
|
|
|
default y
|
|
|
|
|
2018-11-25 17:40:57 +08:00
|
|
|
config RISCV_SOC_INTERRUPT_INIT
|
|
|
|
default y
|
|
|
|
|
2024-01-10 23:11:51 +08:00
|
|
|
config RISCV_MCAUSE_EXCEPTION_MASK
|
|
|
|
default 0x1F
|
|
|
|
|
2018-11-25 17:40:57 +08:00
|
|
|
# We need to disable the watchdog out of reset, as it's enabled by
|
|
|
|
# default. Use the WDOG_INIT hook for doing that.
|
|
|
|
config WDOG_INIT
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
2018-12-03 08:41:38 +08:00
|
|
|
default 8000000
|
2018-11-25 17:40:57 +08:00
|
|
|
|
2018-11-25 17:41:38 +08:00
|
|
|
if MULTI_LEVEL_INTERRUPTS
|
|
|
|
|
|
|
|
config MAX_IRQ_PER_AGGREGATOR
|
|
|
|
default 32
|
|
|
|
|
|
|
|
config 2ND_LEVEL_INTERRUPTS
|
kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.
Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.
Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):
For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-18 19:29:31 +08:00
|
|
|
default y
|
2018-11-25 17:41:38 +08:00
|
|
|
|
|
|
|
config 2ND_LVL_ISR_TBL_OFFSET
|
|
|
|
default 32
|
|
|
|
|
|
|
|
config NUM_2ND_LEVEL_AGGREGATORS
|
|
|
|
default 8 if RV32M1_INTMUX_CHANNEL_7
|
|
|
|
default 7 if RV32M1_INTMUX_CHANNEL_6
|
|
|
|
default 6 if RV32M1_INTMUX_CHANNEL_5
|
|
|
|
default 5 if RV32M1_INTMUX_CHANNEL_4
|
|
|
|
default 4 if RV32M1_INTMUX_CHANNEL_3
|
|
|
|
default 3 if RV32M1_INTMUX_CHANNEL_2
|
|
|
|
default 2 if RV32M1_INTMUX_CHANNEL_1
|
|
|
|
default 1 # just channel 0
|
|
|
|
|
|
|
|
config 2ND_LVL_INTR_00_OFFSET
|
|
|
|
default 24
|
|
|
|
|
|
|
|
config 2ND_LVL_INTR_01_OFFSET
|
|
|
|
int
|
|
|
|
default 25
|
|
|
|
|
|
|
|
config 2ND_LVL_INTR_02_OFFSET
|
|
|
|
int
|
|
|
|
default 26
|
|
|
|
|
|
|
|
config 2ND_LVL_INTR_03_OFFSET
|
|
|
|
int
|
|
|
|
default 27
|
|
|
|
|
|
|
|
config 2ND_LVL_INTR_04_OFFSET
|
|
|
|
int
|
|
|
|
default 28
|
|
|
|
|
|
|
|
config 2ND_LVL_INTR_05_OFFSET
|
|
|
|
int
|
|
|
|
default 29
|
|
|
|
|
|
|
|
config 2ND_LVL_INTR_06_OFFSET
|
|
|
|
int
|
|
|
|
default 30
|
|
|
|
|
|
|
|
config 2ND_LVL_INTR_07_OFFSET
|
|
|
|
int
|
|
|
|
default 31
|
|
|
|
|
|
|
|
config RV32M1_INTMUX_CHANNEL_0
|
kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.
Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.
Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):
For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-18 19:29:31 +08:00
|
|
|
default y
|
2018-11-25 17:41:38 +08:00
|
|
|
|
|
|
|
config RV32M1_INTMUX_CHANNEL_1
|
kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.
Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.
Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):
For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-18 19:29:31 +08:00
|
|
|
default y
|
2018-11-25 17:41:38 +08:00
|
|
|
|
|
|
|
config RV32M1_INTMUX_CHANNEL_2
|
kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.
Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.
Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):
For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-18 19:29:31 +08:00
|
|
|
default y
|
2018-11-25 17:41:38 +08:00
|
|
|
|
|
|
|
config RV32M1_INTMUX_CHANNEL_3
|
kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.
Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.
Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):
For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-18 19:29:31 +08:00
|
|
|
default y
|
2018-11-25 17:41:38 +08:00
|
|
|
|
|
|
|
config RV32M1_INTMUX_CHANNEL_4
|
kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.
Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.
Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):
For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-18 19:29:31 +08:00
|
|
|
default y
|
2018-11-25 17:41:38 +08:00
|
|
|
|
|
|
|
config RV32M1_INTMUX_CHANNEL_5
|
kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.
Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.
Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):
For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-18 19:29:31 +08:00
|
|
|
default y
|
2018-11-25 17:41:38 +08:00
|
|
|
|
|
|
|
config RV32M1_INTMUX_CHANNEL_6
|
kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.
Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.
Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):
For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-18 19:29:31 +08:00
|
|
|
default y
|
2018-11-25 17:41:38 +08:00
|
|
|
|
|
|
|
config RV32M1_INTMUX_CHANNEL_7
|
kconfig: Use 'default' instead of 'def_bool' in Kconfig.defconfig files
Same deal as in commit 4638652214 ("Kconfig: Use 'default' instead of
'def_bool' in Kconfig.defconfig files"), fixing new stuff that got
introduced since then.
Some symbols, like ALTERA_AVALON_PIO, are only defined in
Kconfig.defconfig files, and so need the def_bool.
Motivation (from the note at the end of
guides/kconfig/index.html#common-shorthands):
For a symbol defined in multiple locations (e.g., in a Kconfig.defconfig
file in Zephyr), it is best to only give the symbol type for the "base"
definition of the symbol, and to use 'default' (instead of 'def_<type>'
value) for the remaining definitions. That way, if the base definition
of the symbol is removed, the symbol ends up without a type, which
generates a warning that points to the other definitions. That makes the
extra definitions easier to discover and remove.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-18 19:29:31 +08:00
|
|
|
default y
|
2018-11-25 17:41:38 +08:00
|
|
|
|
|
|
|
endif # MULTI_LEVEL_INTERRUPTS
|
|
|
|
|
2022-09-15 04:23:15 +08:00
|
|
|
endif # SOC_OPENISA_RV32M1
|