From 977abc529f98c1c90a80ad280fe9e58ddd43c87a Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 2 Jun 2021 16:26:27 +0800 Subject: [PATCH 1/2] Revert "riscv: Enable the SiFive CLINT block driver in S-Mode(VIC7100 ONLY)" This reverts commit 1b3668284b76569c3add4db14524fa5ad60cbc4e. The SiFive CLINT driver is supposed to work in M-mode only. Signed-off-by: Bin Meng --- arch/riscv/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index c26f1316bdf..13af5ddfc50 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -175,7 +175,8 @@ config DMA_ADDR_T_64BIT default y if 64BIT config SIFIVE_CLINT - bool "Enable the SiFive CLINT block driver" + bool + depends on RISCV_MMODE || SPL_RISCV_MMODE help The SiFive CLINT block holds memory-mapped control and status registers associated with software and timer interrupts. From 2feaab2bd04ed736c637518b3b553615f0c97890 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 2 Jun 2021 16:30:37 +0800 Subject: [PATCH 2/2] starfive: beaglev: Disable SIFIVE_CLINT and enable RISCV_TIMER As we are running in S-mode, RISCV_TIMER has to be used. Adjust the config file accordingly. Signed-off-by: Bin Meng --- board/starfive/vic7100/Kconfig | 1 - configs/starfive_vic7100_beagle_v_smode_defconfig | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/board/starfive/vic7100/Kconfig b/board/starfive/vic7100/Kconfig index af6c09d4a0a..c49faa954b9 100644 --- a/board/starfive/vic7100/Kconfig +++ b/board/starfive/vic7100/Kconfig @@ -63,6 +63,5 @@ config BOARD_SPECIFIC_OPTIONS # dummy imply SYSRESET imply SYSRESET_GPIO imply CMD_DHCP - imply SIFIVE_CLINT endif diff --git a/configs/starfive_vic7100_beagle_v_smode_defconfig b/configs/starfive_vic7100_beagle_v_smode_defconfig index 9ba0867f9c9..a792a45f310 100644 --- a/configs/starfive_vic7100_beagle_v_smode_defconfig +++ b/configs/starfive_vic7100_beagle_v_smode_defconfig @@ -84,7 +84,6 @@ CONFIG_CMODEL_MEDLOW=y CONFIG_RISCV_SMODE=y CONFIG_RISCV_ISA_C=y CONFIG_RISCV_ISA_A=y -CONFIG_SIFIVE_CLINT=y CONFIG_SBI=y # CONFIG_SBI_V01 is not set CONFIG_SBI_V02=y @@ -1121,7 +1120,7 @@ CONFIG_TIMER=y # CONFIG_RENESAS_OSTM_TIMER is not set # CONFIG_NOMADIK_MTU_TIMER is not set # CONFIG_OMAP_TIMER is not set -# CONFIG_RISCV_TIMER is not set +CONFIG_RISCV_TIMER=y # CONFIG_ROCKCHIP_TIMER is not set # CONFIG_STI_TIMER is not set # CONFIG_STM32_TIMER is not set