mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
risc-v/mpfs: introduce CONFIG_MPFS_CLKINIT flag
This CONFIG_MPFS_CLKINIT is set with bootloaders by default. However, this gives an option to have it unset. In some cases, the clocks may be already set so it becomes unnecessary to re-initialize them. Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
This commit is contained in:
committed by
Xiang Xiao
parent
7a4fac0df6
commit
e111c9a256
@@ -46,6 +46,14 @@ config MPFS_BOOTLOADER
|
||||
---help---
|
||||
This NuttX image is used as a bootloader, which will boot only on one hart, putting the others in WFI
|
||||
|
||||
config MPFS_CLKINIT
|
||||
bool "Initialize system clocks"
|
||||
depends on MPFS_BOOTLOADER
|
||||
default y
|
||||
---help---
|
||||
This initilizes the system clocks at mpfs_start.c file. The option may be also turned off
|
||||
if some other entity has already set them up.
|
||||
|
||||
config MPFS_BOARD_PMP
|
||||
bool "Enable board specific PMP configuration"
|
||||
depends on ARCH_USE_MPU && MPFS_BOOTLOADER
|
||||
|
||||
@@ -27,13 +27,17 @@ CMN_ASRCS += mpfs_head.S
|
||||
endif
|
||||
|
||||
# Specify our C code within this directory to be included
|
||||
CHIP_CSRCS = mpfs_allocateheap.c mpfs_clockconfig.c
|
||||
CHIP_CSRCS = mpfs_allocateheap.c
|
||||
CHIP_CSRCS += mpfs_irq.c mpfs_irq_dispatch.c
|
||||
CHIP_CSRCS += mpfs_lowputc.c mpfs_serial.c
|
||||
CHIP_CSRCS += mpfs_start.c mpfs_timerisr.c
|
||||
CHIP_CSRCS += mpfs_gpio.c mpfs_systemreset.c
|
||||
CHIP_CSRCS += mpfs_plic.c mpfs_dsn.c
|
||||
|
||||
ifeq ($(CONFIG_MPFS_CLKINIT),y)
|
||||
CHIP_CSRCS += mpfs_clockconfig.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MPFS_DMA),y)
|
||||
CHIP_CSRCS += mpfs_dma.c
|
||||
endif
|
||||
|
||||
@@ -121,7 +121,7 @@ void __mpfs_start(uint64_t mhartid)
|
||||
|
||||
/* Setup PLL if not already provided */
|
||||
|
||||
#ifdef CONFIG_MPFS_BOOTLOADER
|
||||
#ifdef CONFIG_MPFS_CLKINIT
|
||||
mpfs_clockconfig();
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user