Skip to contentSkip to conversation

riscv: Enable some configs in the Kconfig

PATCH In review [email protected] 2 participants 5 messages Sep 30, 2021 – Oct 2, 2021

lore
Share & tools
lore
#0 lore raw

cover riscv: Enable some configs in the Kconfig

From: Tekkaman Ninja <[email protected]>

This patchset is trying to enable some configs in the Kconfig for RISC-V:
SYS_MALLOC_LEN
SYS_CLK_FREQ

They are very common config for some developement board. By these patch, we can reduce the #define in the include/configs/*.h, and config them in the menuconfig.

TekkamanV (2):
riscv: Enable SYS_MALLOC_LEN config
riscv: Enable SYS_CLK_FREQ config

 Kconfig             | 2 +-
 common/Kconfig.boot | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.4
#1 lore raw

PATCH 1/2 riscv: Enable SYS_MALLOC_LEN config

From: TekkamanV <[email protected]>

---
 Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Kconfig +1 -1
index a6c42b902f..7f63929c60 100644
@@ -249,7 +249,7 @@ config SYS_MALLOC_F_LEN
 
 config SYS_MALLOC_LEN
 	hex "Define memory for Dynamic allocation"
-	depends on ARCH_ZYNQ || ARCH_VERSAL || ARCH_STM32MP || ARCH_ROCKCHIP
+	depends on ARCH_ZYNQ || ARCH_VERSAL || ARCH_STM32MP || ARCH_ROCKCHIP || RISCV
 	default 0x2000000 if ARCH_ROCKCHIP
 	help
 	  This defines memory to be allocated for Dynamic allocation
Signature · 1 line
2.25.4
#2 lore raw

Re: [PATCH 1/2] riscv: Enable SYS_MALLOC_LEN config

Quoted 3 lines · On Thu, Sep 30, 2021 at 8:07 PM <[email protected]> wrote:

From: TekkamanV <[email protected]>

Please add a commit message.

Quoted 10 lines
---
 Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Kconfig +0 -0
index a6c42b902f..7f63929c60 100644

Kconfig config SYS_MALLOC_F_LEN · line 252

Quoted 5 lines
Kconfig +1 -1
@@ -249,7 +249,7 @@ config SYS_MALLOC_F_LEN
 
 config SYS_MALLOC_LEN
        hex "Define memory for Dynamic allocation"
-       depends on ARCH_ZYNQ || ARCH_VERSAL || ARCH_STM32MP || ARCH_ROCKCHIP
+       depends on ARCH_ZYNQ || ARCH_VERSAL || ARCH_STM32MP || ARCH_ROCKCHIP || RISCV

You need to also migrate existing RISC-V boards to Kconfig, by removing CONFIG_SYS_MALLOC_LEN from their config.h files.

Kconfig config SYS_MALLOC_F_LEN · line 255

Quoted 3 lines
Kconfig +0 -0
        default 0x2000000 if ARCH_ROCKCHIP
        help
          This defines memory to be allocated for Dynamic allocation

Regards,
Bin

#3 lore raw

PATCH 2/2 riscv: Enable SYS_CLK_FREQ config

In reply to [email protected]

From: TekkamanV <[email protected]>

---
 common/Kconfig.boot | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/Kconfig.boot +1 -1
index 902a5b8fbe..4f29cc2d56 100644
@@ -343,7 +343,7 @@ config SYS_TEXT_BASE
 	  The address in memory that U-Boot will be running from, initially.
 
 config SYS_CLK_FREQ
-	depends on ARC || ARCH_SUNXI || MPC83xx
+	depends on ARC || ARCH_SUNXI || MPC83xx || RISCV
 	int "CPU clock frequency"
 	help
 	  TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
Signature · 1 line
2.25.4
#4 lore raw

Re: [PATCH 2/2] riscv: Enable SYS_CLK_FREQ config

Quoted 13 lines · On Thu, Sep 30, 2021 at 8:07 PM <[email protected]> wrote:

From: TekkamanV <[email protected]>

---
 common/Kconfig.boot | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/Kconfig.boot +0 -0
index 902a5b8fbe..4f29cc2d56 100644

common/Kconfig.boot config SYS_TEXT_BASE

Quoted 9 lines
common/Kconfig.boot +1 -2
@@ -343,7 +343,7 @@ config SYS_TEXT_BASE
          The address in memory that U-Boot will be running from, initially.
 
 config SYS_CLK_FREQ
-       depends on ARC || ARCH_SUNXI || MPC83xx
+       depends on ARC || ARCH_SUNXI || MPC83xx || RISCV
        int "CPU clock frequency"
        help
          TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
--

Why do we need this change? It seems nothing related to RISC-V.

Regards,
Bin