diff mbox series

[v3,7/7] riscv: config: enable SOC_CANAAN in defconfig

Message ID tencent_E2812086B695A334EE5E8C70C85CA3171F06@qq.com (mailing list archive)
State Superseded
Headers show
Series riscv: add initial support for Canaan Kendryte K230 | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-7-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-7-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-7-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-7-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-7-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-7-test-6 success .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-7-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-7-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-7-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-7-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-7-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-7-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Yangyu Chen March 4, 2024, 9:06 p.m. UTC
Since K230 has been supported, allow SOC_CANAAN to be selected to build dt
and drivers for it in defconfig.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
 arch/riscv/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Damien Le Moal March 4, 2024, 11:50 p.m. UTC | #1
On 3/5/24 06:06, Yangyu Chen wrote:
> Since K230 has been supported, allow SOC_CANAAN to be selected to build dt
> and drivers for it in defconfig.
> 
> Signed-off-by: Yangyu Chen <cyy@cyyself.name>
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> ---
>  arch/riscv/configs/defconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
> index 89a009a580fe..20b557ec28df 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -33,6 +33,7 @@ CONFIG_SOC_STARFIVE=y
>  CONFIG_ARCH_SUNXI=y
>  CONFIG_ARCH_THEAD=y
>  CONFIG_SOC_VIRT=y
> +CONFIG_SOC_CANAAN=y

Given that the k210 need !MMU, including it like this in the defconfig is
odd... I do not even see how that could work. But that depends on patch 5,
which does not seem OK to me.

>  CONFIG_SMP=y
>  CONFIG_HOTPLUG_CPU=y
>  CONFIG_PM=y
Yangyu Chen March 5, 2024, 4:55 p.m. UTC | #2
> On Mar 5, 2024, at 07:50, Damien Le Moal <dlemoal@kernel.org> wrote:
> 
> On 3/5/24 06:06, Yangyu Chen wrote:
>> Since K230 has been supported, allow SOC_CANAAN to be selected to build dt
>> and drivers for it in defconfig.
>> 
>> Signed-off-by: Yangyu Chen <cyy@cyyself.name>
>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>> ---
>> arch/riscv/configs/defconfig | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
>> index 89a009a580fe..20b557ec28df 100644
>> --- a/arch/riscv/configs/defconfig
>> +++ b/arch/riscv/configs/defconfig
>> @@ -33,6 +33,7 @@ CONFIG_SOC_STARFIVE=y
>> CONFIG_ARCH_SUNXI=y
>> CONFIG_ARCH_THEAD=y
>> CONFIG_SOC_VIRT=y
>> +CONFIG_SOC_CANAAN=y
> 
> Given that the k210 need !MMU, including it like this in the defconfig is
> odd... I do not even see how that could work. But that depends on patch 5,
> which does not seem OK to me.
> 

I don’t know why “not seem OK” here.

I will show the console to tell you what changes in defconfig:

```console
$  linux git:(rv_builtin_dtb_v3) make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- defconfig
*** Default configuration is based on 'defconfig'
#
# configuration written to .config
#
$  linux git:(rv_builtin_dtb_v3) cp .config .config.bak
$  linux git:(rv_builtin_dtb_v3) git checkout k230_dt_initial_v3
Switched to branch 'k230_dt_initial_v3'
$  linux git:(k230_dt_initial_v3) make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- defconfig
*** Default configuration is based on 'defconfig'
#
# configuration written to .config
#
$  linux git:(k230_dt_initial_v3) diff .config .config.bak
301,302d300
< CONFIG_ARCH_CANAAN=y
< CONFIG_SOC_CANAAN=y
2678d2675
< CONFIG_PINCTRL_K210=y
4621d4617
< CONFIG_COMMON_CLK_K210=y
4<
706,4707d4701
< CONFIG_SOC_K210_SYSCTL=y
5334d5327
< CONFIG_ARCH_HAS_RESET_CONTROLLER=y
5336d5328
< CONFIG_RESET_K210=y
$  linux git:(k230_dt_initial_v3) grep -r "CONFIG_ARCH_HAS_RESET_CONTROLLER"
kernel/config_data:CONFIG_ARCH_HAS_RESET_CONTROLLER=y
include/config/auto.conf:CONFIG_ARCH_HAS_RESET_CONTROLLER=y
include/generated/autoconf.h:#define CONFIG_ARCH_HAS_RESET_CONTROLLER 1
include/generated/rustc_cfg:--cfg=CONFIG_ARCH_HAS_RESET_CONTROLLER
include/generated/rustc_cfg:--cfg=CONFIG_ARCH_HAS_RESET_CONTROLLER="y"
.config:CONFIG_ARCH_HAS_RESET_CONTROLLER=y
$  linux git:(k230_dt_initial_v3)
```

As you can see, we only have some drivers enabled for K210 and
CONFIG_ARCH_HAS_RESET_CONTROLLER being enabled. The next grep -r shows it
does not change the kernel behavior.

>> CONFIG_SMP=y
>> CONFIG_HOTPLUG_CPU=y
>> CONFIG_PM=y
> 
> -- 
> Damien Le Moal
> Western Digital Research
diff mbox series

Patch

diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 89a009a580fe..20b557ec28df 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -33,6 +33,7 @@  CONFIG_SOC_STARFIVE=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_ARCH_THEAD=y
 CONFIG_SOC_VIRT=y
+CONFIG_SOC_CANAAN=y
 CONFIG_SMP=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_PM=y