diff mbox series

riscv: Fix compilation error with Canaan SoC

Message ID 20210311102424.34743-1-damien.lemoal@wdc.com (mailing list archive)
State New, archived
Headers show
Series riscv: Fix compilation error with Canaan SoC | expand

Commit Message

Damien Le Moal March 11, 2021, 10:24 a.m. UTC
When CONFIG_SOC_CANAAN is selected, the K210 sysctl driver is always
compiled. Since this driver early init function calls the function
k210_clk_early_init() implemented by the K210 clk driver, this driver
must also always be selected for compilation ot avoid build failures.

Avoid such build failures by always selecting CONFIG_COMMON_CLK and
CONFIG_COMMON_CLK_K210 when CONFIG_SOC_CANAAN is enabled.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
---
 arch/riscv/Kconfig.socs | 2 ++
 1 file changed, 2 insertions(+)

Comments

Palmer Dabbelt March 17, 2021, 4:21 a.m. UTC | #1
On Thu, 11 Mar 2021 02:24:24 PST (-0800), Damien Le Moal wrote:
> When CONFIG_SOC_CANAAN is selected, the K210 sysctl driver is always
> compiled. Since this driver early init function calls the function
> k210_clk_early_init() implemented by the K210 clk driver, this driver
> must also always be selected for compilation ot avoid build failures.
>
> Avoid such build failures by always selecting CONFIG_COMMON_CLK and
> CONFIG_COMMON_CLK_K210 when CONFIG_SOC_CANAAN is enabled.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> ---
>  arch/riscv/Kconfig.socs | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
> index 7efcece8896c..e1b2690b6e45 100644
> --- a/arch/riscv/Kconfig.socs
> +++ b/arch/riscv/Kconfig.socs
> @@ -31,6 +31,8 @@ config SOC_CANAAN
>  	select SIFIVE_PLIC
>  	select ARCH_HAS_RESET_CONTROLLER
>  	select PINCTRL
> +	select COMMON_CLK
> +	select COMMON_CLK_K210
>  	help
>  	  This enables support for Canaan Kendryte K210 SoC platform hardware.

Thanks, this is on fixes.
diff mbox series

Patch

diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index 7efcece8896c..e1b2690b6e45 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -31,6 +31,8 @@  config SOC_CANAAN
 	select SIFIVE_PLIC
 	select ARCH_HAS_RESET_CONTROLLER
 	select PINCTRL
+	select COMMON_CLK
+	select COMMON_CLK_K210
 	help
 	  This enables support for Canaan Kendryte K210 SoC platform hardware.